Script with image recognition
Posted: 30 Jan 2023, 16:57
So I've been meaning to make a script with different spam hotkeys running at different times, along with image recognition. I tried various ways but they didn't work.
My idea so far was
This whole thing but in a loop. The way I managed to make my spam hotkeys work so far was through toggles, but I'd like them to activate automatically. This was the toggle I use:
Any help or resources to move in the right direction will be deeply appreciated.
My idea so far was
Code: Select all
#IfWinNotActive window1.exe
SendInput {Hotkey1, off}
SendInput {Hotkey2} (spam)
#IfWinActive ahk.exe window1.exe
SendInput {Hotkey2, Off}
(image 1 or 2 recognized) = SendInput {Hotkey3} (single use)
Sleep 100
SendInput {Hotkey4} (spam)
SendInput {Hotkey4, Off} (after 12m, or 720000ms)
sleep 100
SendInput {Hotkey5} (single use)
Sleep 100
SendInput {Hotkey1} (spam)
return
Code: Select all
*f2::
toggle := !toggle
if (toggle) {
SetTimer, HotKey1, 1
} else {
SetTimer, HotKey1, Off
}
return