The script searches for one picture in a loop until it finds it. and after he finds it he will point the cursor at it and click on the image, then go to the search for the next picture
I know that I'm close to unraveling, but I've tried many options and I can not get the desired result
here is the code
Code: Select all
; Generated by AutoGUI 1.4.8a
#NoEnv
#SingleInstance Force
SetWorkingDir %A_ScriptDir%
Loop
{
ImageSearch, FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, %A_WorkingDir%\test1.bmp
if ErrorLevel = 0
MouseMove, %foundX%, %foundY%, 30
MouseClick, left,%foundX%, %foundY%,
break
sleep, 1000
}
Loop
{
ImageSearch, FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, %A_WorkingDir%\test2.bmp
if ErrorLevel = 0
MouseMove, %foundX%, %foundY%, 30
MouseClick, left,%foundX%, %foundY%,
break
sleep, 1000
}
p::Pause
Esc:: ExitApp