AutoIt v3 has a HotKeySet feature. It sets a hotkey that calls the user function when pressed. This is a system hotkey, meaning that the key cannot be used for anything else when the hotkey is installed.
Basically, I would like to catch Esc or any other key, for example $ , ` , etc., and when the user presses it anywhere, even outside the application, he should inform me.
For example, I would do like HotKeySet ({ESC}) inside a loop, and when this is done, the program will wait until this key is pressed earlier.
public static void work() { while (true) { string task = null; lock (locker) if (tasks.Count > 0) { task = tasks.Dequeue(); if (task == null) { return; } } if (task != null) {
Madboy
source share