Code: Select all
wTitle = MEmu
Loop {
WinWait, %wTitle%
SetTimer, MEmu, 500
WinWaitClose
SetTimer, MEmu, Off
}
Memu:
PixelSearch,,, 343, 44, 343, 44, 0x020184, 100
If !ErrorLevel ; Skip if pixel was found
SetKeyDelay, 100
ControlSend,, {F1 2}, %wTitle%
Return
PixelSearch,,, 688, 319, 688, 319, 0x06ce07, 100
If !ErrorLevel ; Skip if pixel was found
SetKeyDelay, 100
ControlSend,, {F3 2}, %wTitle%
PixelSearch,,, 327, 60, 327, 60, 0xa10c1d, 100
If !ErrorLevel ; Skip if pixel was found
Return
SetKeyDelay, 100
ControlSend,, {F2 2}, %wTitle%
Return
esc::exitapp
F5::Pause ; press F1 to play/pause