Code: Select all
wTitle = MEmu
Loop {
WinWait, %wTitle%
SetTimer, MEmu, 100
WinWaitClose
SetTimer, MEmu, Off
}
Memu:
PixelSearch,,, 257, 43, 257, 43, 0x11118c, 100
If !ErrorLevel ; Skip if pixel was found
Return
SetKeyDelay, 100
ControlSend,, {F1 2}, %wTitle%
Return
esc::exitapp
F5::Pause ; press F1 to play/pause
its works with the title game but when i change fo anything else an error occurs why?