Code: Select all
#MaxThreadsPerHotkey 2
^y::
Toggle := !Toggle
loop
{
If not Toggle
break
Send, .route 24
Send, {enter}
sleep, 4000
Send, 4
Send, {enter}
sleep, 4500
}
return
Code: Select all
#MaxThreadsPerHotkey 2
^y::
Toggle := !Toggle
loop
{
If not Toggle
break
Send, .route 24
Send, {enter}
sleep, 4000
Send, 4
Send, {enter}
sleep, 4500
}
return
yes i want it to work when google chrome is not the active window, u cud say that i want it to run in the background on only google chrome.boiler wrote: ↑12 Sep 2021, 13:23It depends on what you mean. Do you want the hotkey to be active only when Chrome is the active window, or do you want it to alway send those keystrokes to Chrome whether it is the active window or not? Use #IfWinActive for the former and ControlSend for the latter.
Code: Select all
#MaxThreadsPerHotkey 2
^y::
Toggle := !Toggle
loop
{
If not Toggle
break
ControlSend, , .route 24 {enter} 4 {enter}, turbos-pokemon - Google Chrome
SetKeyDelay, 800
}
return
Users browsing this forum: No registered users and 109 guests