SendMode Input SetDefaultMouseSpeed, 0 #MaxThreadsPerHotkey 3 ^+s:: #MaxThreadsPerHotkey 1 IfWinExist eGenesis Client { WinActivate WinGetPos,,, wWidth, wHeight LargeIconX1 := wWidth - 315 LargeIconX2 := wWidth - 185 ; SmallIconX1 := wWidth - 137 ; SmallIconX2 := wWidth - 31 } else return if KeepRunning { KeepRunning := false return } KeepRunning := true loop { PixelSearch, mx, my, %LargeIconX1%, 61, %LargeIconX2%, 61, 0x0066BC, 1 if ErrorLevel = 0 { MouseGetPos, mosx, mosy Click, %mx%, %my% MouseMove, mosx, mosy sleep 200 } ; PixelSearch, mx, my, %SmallIconX1%, 63, %SmallIconX2%, 63, 0x0066BC ; if ErrorLevel = 0 ; { ; MouseGetPos, mosx, mosy ; Click, %mx%, %my% ; MouseMove, mosx, mosy ; sleep 200 ; } if not KeepRunning break } KeepRunning := false return