doco
doco

Reputation: 24

Autohotkey Not Auto

Running AutoHotKey Version 3.0.06.01 with Win 10 Version 10.0.19043 Build 19043 on a System SKU LENOVO_MT_81CU_BU_idea_FM_YOGA 730-15IKB laptop.

I have read many postings about AHK not performing as expected on Win10 OS. I have followed those instructions: rebooting, uninstall/reinstall, changing UAC settings, using run as admin , checking virus software -- et al.

I am very new and have only attempted very rudimentary scripts: Send Hello World, Msgbox Hello World and the like. Those seem to work fine by simply selecting the indicated hot keys. However,

The problem: when attempting use [Run] EG.

^j:: Run Notepad.exe or    ; an executable
^1:: Run C:\HamSphere\UnaMas.xlsm    ; a file

I must

1. select the saved file
2. right click and select run script
3. (the hotkeys icon displays in the tray)
4. then select the indicated hot keys

in order for the script to run as expected. I cannot simply select the indicated hotkeys. Compiling the file doesn't help.

Question: is this normal? If so, it seems like it defeats the purpose of hot keys.

TIA doco

Upvotes: 0

Views: 93

Answers (2)

scso
scso

Reputation: 405

You don't need to compile scripts.

There are 3 main options for getting your scripts executed on start.

  • Startup folder.

  • Scheduled tasks.

  • "AutoHotkey.ahk": The program looks for a script file called AutoHotkey.ahk in the following locations, in this order:

    1. The directory which contains the AutoHotkey executable.
    2. The current user's Documents folder.

And if you don't want your file to be called AutoHotkey.ahk you could for example save it somewhere else and call it with Run from AutoHotkey.ahk.

Upvotes: 0

doco
doco

Reputation: 24

Apparently,

1. right clicking the *.ahk file and selecting the [Run Script] menu item
2. compile the script to an executable then double click that executable

will cause script to be ready and running in the background as evidenced by the green icon in the tray. This then allow use of whatever hotkeys defined in the script, to run. The scripts will automatically end when windows closes or the user right clicks the associated i image and selects [Exit] from the subsequent drop down.

Kind of a toss-up to actually going and getting the exe/file.

Upvotes: 0

Related Questions