first off I am not a programmer^^' but I need help with a script.
I want to send a key to 2 different inactive windows every 3 seconds. I want it to pause when a window becomes active, and continue when both are inactive again.
this is my old code I have been messing with. For some reason it keeps sending g to the window2 eventho I have window1 active. O.o
pls help
Code: Select all
DetectHiddenWindows, On
wintitle = game title 1
wintitle2 = game title 2
#g::
Loop {
IfWinNotActive, %wintitle% && %wintitle2%
{
controlsend,,g, %wintitle%,
sleep, 50
controlsend,,g, %wintitle2%,
sleep, 2500
}
}
return