how to interrupt other threads with a hotkey? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Mike00

how to interrupt other threads with a hotkey?

24 Apr 2018, 20:29

I want a script that can interrupt others threads. For example:
a::
;do action a
sleep, 2000
;do action a2
sleep, 3000
;...
return

While a is being excecuted, i press b, then this thread will stop and return.
I tried to replace all sleep command with

input, key, L1 T2
if (key = "b")
return

I also tried reload command. But i wonder if there is any way better than that? Thanks in advance.
User avatar
Barney
Posts: 55
Joined: 28 May 2014, 20:03
Location: Germany

Re: how to interrupt other threads with a hotkey?  Topic is solved

24 Apr 2018, 21:21

you can make a 'b' hotkey which changes a variable and check that variable after the sleep commands.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 344 guests