Getting started with AutoHotkey.

I’ve decided to give AutoHotkey a try and downloaded the no-install version for use on my USB thumb drive. When I ran it, it created a sample script file called AutoHotkey.ahk in your My Documents folder. Not exactly something I’d want happening if I were to run AutoHotkey on a public computer, such as one at the library. After doing some research online to determine a workaround, I learned I can copy this sample script to the application folder and rename it to AutoHotkey.ini, so when I run it from my thumb drive, the script contained in the INI file will automatically run.
I don’t know about you, but I prefer having AutoHotkey ask me which script file I want to open when I run it, so I replaced the contents of AutoHotkey.ini with this little script:

FileSelectFile, SelectedFile, 3, , Open a file, AutoHotkey Scripts (*.ahk)
if SelectedFile =
MsgBox, Nothing to do!
Run, AutoHotkey.exe “%SelectedFile%”

The script runs like a charm.
As a longtime user of AutoIt, I’m finding the AutoHotkey commands very easy to learn. At this point I don’t know which of the two scripting utilities are better but I am sure the answer will reveal itself over time.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s