any event triggered when any Hotkey(only) is pressed?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
ThumpieBunnyEve
Posts: 109
Joined: 03 Aug 2016, 19:03

any event triggered when any Hotkey(only) is pressed?

05 Aug 2021, 06:22

im not looking for anyKey detection.
Im looking for the possibility of any Event that's raised,
when any of the ascribed hotkeys, of lets say, 13 outlined hotkeys, are pressed.

so when a hotkey thread activates, it still tries to do what it was intended to do,
but an event that knows hotkey threads are active is triggered. allowing blanket options, active window detection, halts and such.

for example, using a check like this, i could, when a script starts,
detect the last_modified time of the script.
then when -any- of that scripts hotkeys are pressed and their individual threads raised,
i could simultaneously detect the current_modified time of the script to see if its different from last_modified,
and if so, reload the script interrupting the hotkey it was going to process output for.
(or at least reloading the script once that hotkey concludes, if threads are only sudo or have little task.)

so is there some generic A_hotkeyWasActivated var, or event in AHK?
User avatar
boiler
Posts: 17072
Joined: 21 Dec 2014, 02:44

Re: any event triggered when any Hotkey(only) is pressed?

05 Aug 2021, 06:28

I don’t know of any such generic event, but a single gosub line in each hotkey subroutine would accomplish this.
User avatar
ThumpieBunnyEve
Posts: 109
Joined: 03 Aug 2016, 19:03

Re: any event triggered when any Hotkey(only) is pressed?

05 Aug 2021, 06:31

that's exactly what i was hoping to avoid. adding a gosub for -every- hotkey is what im already doing in my scripts, and its just kinda crummy doing it that way.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Yincognito and 328 guests