Wrapper for the hotkey command

Post gaming related scripts
A_AhkUser
Posts: 1147
Joined: 06 Mar 2017, 16:18
Location: France
Contact:

Wrapper for the hotkey command

18 Nov 2018, 16:01

A script to create hotkeys, that may be context-sensitive, just as with the Hotkey built-in command - for which it is intended to be a possible interface. It is originally based on the Hotkey command wrapper by RUNIE, and has been then modified by implementing the ideas contained in a Function to Remap Joystick Button shared by lord_ne and, later, by implementing the HotkeyNormalize function (thanks joedf for letting me know about xHotkey.ahk ;))

Hotkey.ahk - download and example

  • The wrapper supports the 'down' and 'up' event of joystick buttons (events internally handled quite naively by means of both GetKeyState and SetTimer).
  • It also allows to create groups of hotkey to operate later on them, specifically. [EDIT: remove from the current implementation] [EDIT: now available again]
I have written a compelling overview of the use of the script. The script is provided with an example to illustrate its main features.
The script do not deal with hotkeys' options (namely B (thread buffering), P (thread priority), T (max thread per hotkey) and I (input level)). In particular, I don't know all the ins and outs of dealing with thread priority here (as I said, the script use internally timers).
Note that the recent rewrite has been briefly tested.

Cheers

[EDIT: fixed links]
Last edited by A_AhkUser on 24 Jul 2020, 07:49, edited 1 time in total.
my scripts
A_AhkUser
Posts: 1147
Joined: 06 Mar 2017, 16:18
Location: France
Contact:

Re: Wrapper for the hotkey command

28 Apr 2019, 01:10

Code updated. 'Docs' updated accordingly.

Some notes about the implementation:
> - The wrapper is now a standard function object, it implements a call function to handle the joystick button presses, this being passed as label parameter to both the Hotkey and the SetTimer commands.
> - The class use a variadic (is that I plan to restore the feature which allowed in a previous version of the script to create groups of hotkey to operate later on them, specifically) path indexer to keep track of instances and also dispose them properly.

See ya for any feedback or suggestions: they are welcolme! :D

[EDIT: fixed link]
my scripts

Return to “Gaming Scripts (v1)”

Who is online

Users browsing this forum: No registered users and 11 guests