Code: Select all
wTitle = MEmu
Loop {
WinWait, %wTitle%
SetTimer, MEmu, 450
WinWaitClose
SetTimer, MEmu, Off
}
Memu:
PixelSearch,,, 327, 61, 327, 61, 0x840c1a, 100
If !ErrorLevel ; Skip if pixel was found
Return
SetKeyDelay, 450
ControlSend,, {F2 2}, %wTitle%
Return
esc::exitapp
F5::Pause ; press F5 to play/pause