how pause and restart with same hotkey?

Get help with using AutoHotkey and its commands and hotkeys
fiendhunter
Posts: 3
Joined: 24 Jul 2019, 15:27

how pause and restart with same hotkey?

18 Aug 2019, 21:44

Hi,
I have a trouble, that I cant get out of this. If someone can help me, Ill be greatfull.

I want to start and stop (or pause) the script with the one hotkey. And when I hit the hotkey, it should release the all pressed keys. But I couldnt get it yet :)

Code: Select all

XButton2::                     ; start the sending keys down and up

settimer
if ( GetColor(707,1048)=="0xCB754A" )
{
send {t up}
sleep 10
send {" down}
sleep 150
send {" up}
send {z down}
sleep 300
send {z up}
} else {
send {t down}
}
return

XButton2::                      ; pause, break or stop with the sendings all keys up
send {z up}
send {t up}
send {" up}
Pause
return

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], KilliK, MikeyG12, Permagrin and 76 guests