Help with multi-threading AHK Script
Posted: 20 Nov 2021, 09:27
Hello guys, I want to use AHK V2 to run the labels at the same time using only 1 AHK. (multiples routine in one script)
it's possible?
I'm creating a script that needs to have fast reactions, whenever a certain pixel changes on the screen it should do the action I put as fast as possible.
I'm currently using AHK V1, to do this I need to open 3 AHK Script to run 3 Labels at the same time.
Could someone give me examples of how I can do this in AHK V2 without running 3 AHK Script?
Example:
for performance reasons, I would like the script to run Label1 and Label2 at the same time.
it's possible?
I'm creating a script that needs to have fast reactions, whenever a certain pixel changes on the screen it should do the action I put as fast as possible.
I'm currently using AHK V1, to do this I need to open 3 AHK Script to run 3 Labels at the same time.
Could someone give me examples of how I can do this in AHK V2 without running 3 AHK Script?
Example:
Code: Select all
SetTimer, Label1, On
SetTimer, Label2, On
Label1:
ToolTip, Label1 Start, 250, 250, 1
Sleep 1000
RETURN
Label2:
ToolTip, Label2 Start, 500, 500, 2
Sleep 1000
RETURN
for performance reasons, I would like the script to run Label1 and Label2 at the same time.