
This course is for the complete beginner! No AutoHotkey, or programming, knowledge is necessary! It's also built in a way that does not expect you to work through each lecture. You can jump-around and watch videos that interest you. Very little "requires" you to have watched a previous video...
Having some default settings for your scripts can save you time and speed-up your code development. We review some helpful commands I have in my scripts that I'm developing.
Isaias and I use AutoHotkey very differently therefore have very different default settings in our scripts. There are a LOT of possibilities to include in your scripts! Here we cover some of the ones we recommend and why to have them in your script
Adding comments (known as annotating your code) is a critical step to ensuring you, and others, can easily understand what the goal is that you're doing in your scripts!
A famous quote is "When a programmer first creates his code, only he and God know how it works, a few months down the line and only God knows""
By adding comments to your code, you can make it much easier to dive back into it at a later date
In this video we explain what AHK Toolkit is and how to use it.
It is not a requirement however you can get the script here: https://the-Automator.com/AHKToolkit
The AHKToolkit is a great way to speed up your code development!
In our experience around 99% of scripts are built to have a single instance. It's super rare to want more than one instance of a script thus you'll want to use the #SingleInstanceForce directive
Many people just starting out with AutoHotkey are confused when certain parts of their scripts don't work / get executed. Understanding the AutoExecute section is critically important to ensure your scripts work as you expect them to.
When you first start coding in AutoHotkey it can be confusing if you should put your code all in one script, or have separate scripts. Over the years I've come to realize it depends... You probably want to do both! Have one main script that has a lot of your automation and then have separate ones that compartmentalize your code and make it easy to share with others.
Sending keystrokes is one of the most used functionality in AutoHotkey. The Send command is a simple way to send keystrokes to programs. There are special keys that require specific settings. Sending Raw is a simple way to work around this!
Understanding the difference between commands and functions is really helpful! Using functions is, generally speaking, a better approach however both are very useful. You can think of Directives (things that begin with # sign) as a "setting" that, typically, you apply once.
Sending clicks to a windows is amazingly simple! Properly getting the coordinates as to where to send the click is a bit more complex. Isaias walks us through how to accurately get the coordinates where you want to click.
Being able to find an image on the screen is a great / easy way to automate your programs.
AutomateMyTask is a free tool that helps you write your AutoHotkey syntax.
Be sure to understand, image search technology is something that should only be used on the computer you create the script with. Trying to use any sort of image search approach across multiple computers rarely works! The reasons for failures are many but just understand you're really setting yourself up for heartache if you try and use it on other computers.
Often people use AutoHotkey because they want to "spam" a key (send the key stroke multiple times). An easy approach to this is to use a loop! We show you here how to use a loop and create a toggle variable to turn on/off the loop.
A common point of confusion to people new to AutoHotkey is when to use percentage signs in their code. Here we give some great specific examples of how and when to use them. Read the documentation for further details.
Getting user feedback is a great way to make your scripts more valuable. GUIs are Easy to create in AutoHotkey however, often we just want one piece of input from a user. Here we show you how to use the InputBox command
Being able to use the Hide parameter will easily allow you to collect info (like passwords) that you don't want to be displayed as the user types their input.
Often we want to ask a user for either a file or folder location. Here we show you how easy it is in AutoHotkey.
FileSelectFile easily allows you to let the user select one, or multiple, files. We show you how you can apply masks (only selecting specific types of files, and choose if you want to overwrite a file that you're saving
FileSelectFolder will let the users select the folder
Running files, Folders, or URLs is easy with AutoHotkey! Here we walk through how easy it is to launch them using the Run.
If you want to wait for the program you're launching to wait, check out the RunWait command.
While AutoHotkey is single threaded, it is fairly easy to "fake" multi-threading by using a SetTimer. Here we show how to easily create the appearance of multi-threaded environment.
It may seem like a little thing but being able to remap keys to YOUR preference is a huge win! This is very easy in AutoHotkey and we show you how it's done in this lesson.
Often programs have arbitrary selections of accelerator keys (Hotkeys) that trigger actions. With AutoHotkey it is really easy to change them to something meaningful TO YOU!
We also show you how you can have AutoHotkey not "eat" the hotkey.
Sometimes you want to wait for a specific window to be active.
Using WinActive (easy way to work in general) Make sure you review using SetTitleMatch mode to ensure you get what you want
Sometimes you want hotkeys to be specific to a specific program. Context-sensitive hotkeys are a great way to re-use the same key-combination however have it do something different in each program.
#IfWinActive is super easy to use and can give you great personalized hotkeys!
Having your code only work if a window exists is easy with AutoHotkey. IfWinActive and IfWinExist are
SetTitleMatchMode is important to set or your scripts may not work as expected
Sometimes you'll download scripts that mention they require the "Including of a library / function". The #Include directive is very straight-forward and easy to use. Also, we cover how you can avoid needing to use it.
Understanding the built-in Windows security system is critical to understanding when you need to "elevate" your script. Often it isn't needed however here we discuss running your script as an Administrator. Just be sure that you use it appropriately. Also, any script that is launched from an elevated script will inherit the elevated status.
Window's User Access Control (UAC) is added protection that Microsoft added in Windows 7+. It did add complications to how to automate scripts. The UAC prevents programs from easily accessing: Files/folders, your registry, Programs, etc.
Sometimes the UAC will prevent Hotkeys & Hotstrings from working. Running your script as an Administrator is an easy way to work-around this issue.
Often things don't work the way we expect them to. Here are some good trouble-shooting steps to try and diagnose what is going wrong.
Here are some more advanced approaches on how to troubleshoot your code.
Questioning your assumptions is critical yet very hard. It's like trying to proof-read your own work. Taking a break between things can help you realize the assumptions you have.
The bobble-head / Rubber-ducky approach is a tried, and proven, way to troubleshoot your code. Saying things out loud often helps you spot your errors.
Are you starting to learn AutoHotkey but don't know where to begin? Have some simple AutoHotkey questions you want answers to but don't want to wade-through hours of video? Then this AutoHotkey course is for you!
This is part 2 of the most Frequently Asked Questions regarding AutoHotkey! Part 1 was a Free AutoHotkey course for people BEFORE they started to code. It had lots of free tools to help get started. This course continues on where we left off and begins to program in AutoHotkey.
As in the last course the lessons don't "build" upon one another so you can jump around and get the AHK questions you have answered FAST!
AutoHotkey is an amazing language designed for people that are not programmers! This means that AHK isn't as "strict" as most languages and there are lots of little things that cause confusion for people just starting out. This course addresses many of those "little things" that cause people grief when they first start programming in AutoHotkey.
Learning AutoHotkey should not be difficult! This course is designed to help even the least technical person begin to code in AutoHotkey.
Give the AHK FAQ course a try and start learning today! Remember, if you're not, in any way, satisfied, all Udemy courses have 100% money back guarantee!
Joe Glines & Isaias Baez
the-Automator / RaptorX