➡the-🅰utomator LIve AutoHotkey Support⬅
Channel: AUTOHOTKEY Gurus
Date: 2023-02-24

TLDR: The video provides tips and tricks for troubleshooting and improving efficiency in AutoHotkey scripting, including using functions, removing quotation marks, and utilizing tools like message boxes and input commands.

1. 00:00 💡 The speaker shares a script in auto hotkey V1 code and troubleshoots an issue with opening an Excel file in a program.
 1.1 The speaker greets the audience and mentions the Friday Link, but laments the inconvenience of time zones.
 1.2 The speaker suggests addressing difficult questions later and starting with easier ones first.
 1.3 The speaker shares a script written in auto hotkey V1 code and suggests adding a requires directive to indicate the code version.
 1.4 The speaker demonstrates a program that opens an Excel file every 15 minutes but encounters a problem where the file does not open despite the program running multiple times.
 1.5 The speaker discusses the importance of using the correct time format in a program and suggests trying to reset the format to fix the issue.

2. 17:36 🔧 Inspect variables, test code, and use output window command to fix errors in auto hotkey scripts.
 2.1 Check if the if statement is ever true and add a message box on line 39 to test if the code is executing correctly.
 2.2 The speaker provides tips on fixing quotation mark errors and testing a script.
 2.3 The speaker inspects variables and finds an if statement that never runs, leading to a message box displaying the issue.
 2.4 Use the output window command to quickly view variables and hard code values to avoid entering information every time while fixing errors in auto hotkey scripts.
 2.5 To format time correctly, use the set say format time method with the first parameter being the variable to save the information and the second parameter being the time format.
 2.6 The speaker encountered an issue with a hotkey not providing accurate information and attempted to locate a help file through various methods.

3. 26:37 📝 Comparing times in Excel can be inaccurate and cause issues, but using a tool to fix errors and removing quotation marks can save time and improve accuracy.
 3.1 The lecture discusses the documentation on Huntly.com, specifically focusing on V1 and the format time feature.
 3.2 The speaker suggests using a tool to fix errors and save time when working with Excel.
 3.3 Comparing times as strings using greater than or equals to may not be accurate and requires strings formatted like "a now" to compare correctly.
 3.4 The comparison is failing because it's comparing two strings instead of numbers, resulting in incorrect outputs and issues with opening Excel files.
 3.5 The speaker discusses removing quotation marks from a script and suggests using a set timer to run a spreadsheet file at regular intervals.
 3.6 Remove quotation marks from Excel path to avoid duplication in code.

4. 35:17 💻 Use functions in coding to streamline code and improve efficiency by reducing redundancy and allowing for easier parameterization.
 4.1 The speaker discusses the use of input boxes and GUIs in scripting and suggests creating a function to avoid repeating code.
 4.2 Functions are an easy way to streamline code and improve efficiency.
 4.3 Use variables for the title and prompt in the function to avoid repeating code and make them behave the same way.
 4.4 Using functions in coding can make the code more efficient by reducing redundancy and allowing for easier parameterization.
 4.5 Instead of changing reload four times, the function is changed once to save time and avoid reloading when asking the user for input.

5. 42:43 💻 Using AutoHotkey to create message boxes with yes or no buttons and activate open applications, while also being cautious of Excel's time string conversion.
 5.1 Create a message box with a yes or no option to exit the script, and adjust the width and height of each parameter as needed.
 5.2 The speaker demonstrates how to use message boxes with yes or no buttons and how to activate and bring to the front an open application using AutoHotkey.
 5.3 Click away after opening the confirm window and if it says okay, click outside to see what happens when it runs.
 5.4 Comparing times in Excel using strings instead of numbers can cause problems in certain situations, as it checks serial numbers for time and requires conversion into a timestamp.

6. 49:27 💻 The speaker shared tips on using the input command and clipboard to improve scripting, but acknowledged a tricky task without a clear solution.

7. 57:26 🔑 Learn how to use AutoHotkey to record key presses and connect with SQL databases, troubleshoot issues with setting up keys in an editor and adding undo functionality, and ensure the window is active before applying remote control settings

8. 01:07:41 💾 Learn how to efficiently store data in tree views and databases
https://the-Automator.com/AHKHero