5

How can I start the current version of autohotkey?

I have used autohotkey on and off for maybe a decade or more.. and they've changed it such that I am now unsure how to start it.

I am on Windows 10.

I got to autohotkey.com and choose download and "download current version"

And I download 30/04/2020 19:00 3,245,600 AutoHotkey_1.1.32.00_setup.exe

I run it and it appears to install, and then I get

enter image description here

So I double click the icon with the classic autohotkey logo and the name "autohotkey"

That icon is a shortcut to "C:\Program Files\AutoHotkey\AutoHotkey.exe" so it's definitely the right icon to be clicking.

But then things get ridiculous

enter image description here

See it just loads up a help file and shows the help file on screen.

And it's not loading up autohotkey

from a cmd prompt, I see that the autohotkey.exe process is not loaded.

C:\Users\user>tasklist >a.a

C:\Users\user>sort a.a > b.b

C:\Users\user>notepad b.b

C:\Users\user>

========================= ======== ================ =========== ============
aesm_service.exe              8724 Services                   0      2,300 K
ApMsgFwd.exe                  9316 Console                    5      6,552 K
ApMsgFwd.exe                 17064                           10      6,304 K
ApntEx.exe                   10024 Console                    5      7,600 K
ApntEx.exe                   15724                           10      7,268 K
Apoint.exe                   10192 Console                    5     14,504 K
Apoint.exe                   14848                           10     13,368 K
ApplicationFrameHost.exe      3288 Console                    5     30,076 K
ApplicationFrameHost.exe     17788                           10     23,372 K
armsvc.exe                    4944 Services                   0      1,408 K
browser_broker.exe            4700                           10      7,100 K
browser_broker.exe           15984 Console                    5     30,340 K
chrome.exe                    1556 Console                    5    158,468 K
chrome.exe                    3640 Console                    5     68,076 K
chrome.exe                    3760 Console                    5     62,540 K

Then I try from the command prompt, still, autohotkey.exe does not start autohotkey.exe !!

C:\Program Files\AutoHotkey>autohotkey.exe

C:\Program Files\AutoHotkey>tasklist >c:\blah\a.a

C:\Program Files\AutoHotkey>find "chrome" c:\blah\a.a

---------- C:\BLAH\A.A
chrome.exe                    1556 Console                    5    158,988 K
...
chrome.exe                   13132 Console                    5     22,836 K

C:\Program Files\AutoHotkey>find "auto" c:\blah\a.a

---------- C:\BLAH\A.A

C:\Program Files\AutoHotkey>

And no icon in the bottom right area 'cos no autohotkey started!

  • 1
    Did you read the tutorial that's helpfully linked on the first page of the help-page you got? – Mast May 1 at 4:16
  • During the decade you used previous versions, did you start it with only the exe-file then? (What about the actual script you wanted to run?) – MEMark May 1 at 10:19
  • @MEMark I started it with the exe file. Then to run the actual script I wanted to run, that was just the default file that the exe would run. After running the exe, then autohotkey.exe would be in processes list as it'd run, and a green autohotkey icon appeared in the bottom right, i'd right click it and choose "edit script". And i'd put any key remappings I needed in there. And if i'd wanted to put some stuff in another file so as to separate things a bit, then I guess I might have looked up how to call a script file from a script file. – barlop May 1 at 11:13
  • 1
    @Mast No I didn't. I've used autohotkey for over 10 yrs and i'm meant to read a beginners tutorial with sentences like this "Before learning to use AutoHotkey (AHK), you will need to download it. After downloading it, you may possibly need to install it" And besides that, the page that comes up when u run autohotkey.exe is not written4 me.It starts by telling me something I already know (that I need to write a script to tell it to do something).This was always the case.Then it says "To learn how, read the tutorial".Well I already know that and how2write a script .So (understandably) I didn't – barlop May 1 at 17:36
  • 1
    All that is perfectly sensible as long as you got it to work in the end. When that failed, I'd have imagined you taking another look at that tutorial. – Mast May 1 at 18:08
13

AutoHotkey by itself does nothing, so it gave you the help file to learn what it does.

You don't start AutoHotkey, you start instead a AutoHotkey script, which is a file with the extension of .ahk. AutoHotkey will execute the script file for you.

When running the script, it will show a green H icon in the traybar. A right click on the icon will give several options, including Exit to stop the script. To have a script run on login, place it in the Startup group at C:\Users\USER-NAME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup.

Note added by barlop Comment from LPChip indicates that indeed it used to start straight away, it ran a default empty script. But then it changed to the mechanism described by harrymc in this answer.

EDIT (harrymc)

For working directly in AutoHotkey, the best tool I found is AHK Studio, which is an interactive development environment for the writing and debugging of AHK scripts.

For a wealth of information about AHK Studio, see the post
Level-up your AutoHotkey coding by using AHK Studio.

enter image description here

| improve this answer | |
  • isn't there a default script that it loads automatically and so when you run autohotkey.exe it'd start autohotkey And run the empty script and you can edit that script? – barlop Apr 30 at 19:05
  • 1
    @barlop not anymore. You start with nothing but a help file and you have to create your own .ahk script and run it for it to work – LPChip Apr 30 at 19:06
  • @LPChip ok so it changed(that solves that puzzle).. any idea when that change happened? – barlop Apr 30 at 19:08
  • 2
    @barlop No. I've used autohotkey like 10 years ago for the first time, so I know that it once was like this. Recently at work I had to use it again, which is like a year ago, and found that it already uses this mechanism. It installs, no example scripts or anything. – LPChip Apr 30 at 19:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.