Page 1 of 1

Help with image search

Posted: 16 Feb 2018, 17:18
by IHAT
Hello master coders,

I have 4 images, 1,2,3,4, image 1&3 long term and image 2&4 short term
the conditions
if 1&2 found => 2 mouse clicks
when image 2 changes to image 4; i need the micro to click 1 mouse click then move to the image_search from start.
tried many things, like repeat & until, If, while & endwhile but nothing seems to work...either not work or keeps looping and clicking non stop

Appreciate if someone can help or give me an idea on how to do that...

Label>Image_search
ScreenCapture>979,356,1310,539,%TEMP_DIR%\screenrect.bmp
//Find
FindImagePos>%BMP_DIR%\image_1.bmp,%TEMP_DIR%\screenrect.bmp,0.7,1,XArr,YArr,NumFound1,CCOEFF
ScreenCapture>306,358,638,546,%TEMP_DIR%\screenrect.bmp
//Find
FindImagePos>%BMP_DIR%\image_2.bmp,%TEMP_DIR%\screenrect.bmp,0.7,1,XArr,YArr,NumFound4,CCOEFF
ScreenCapture>306,360,647,549,%TEMP_DIR%\screenrect.bmp
//Find
FindImagePos>%BMP_DIR%\image_3.bmp,%TEMP_DIR%\screenrect.bmp,0.7,1,XArr,YArr,NumFound2,CCOEFF
ScreenCapture>973,351,1322,552,%TEMP_DIR%\screenrect.bmp
//Find
FindImagePos>%BMP_DIR%\image_5.bmp,%TEMP_DIR%\screenrect.bmp,0.7,1,XArr,YArr,NumFound3,CCOEFF
If>{(%NumFound1%>0) AND (%NumFound2%>0)}
MouseMove>45,244
LClick
MouseMove>45,217
LClick
Else
If>{(%NumFound1%>0) AND (%NumFound4%>0)}
MouseMove>101,218
LClick
Else
Goto>Image_search
Endif
Endif
If>{(%NumFound3%>0) AND (%NumFound4%>0)}
MouseMove>42,243
LClick
MouseMove>101,218
LClick
Else
If>{(%NumFound3%>0) AND (%NumFound2%>0)}
MouseMove>101,218
LClick
Else
Goto>Image_search
Endif
Endif

Re: Help with image search

Posted: 16 Feb 2018, 20:19
by boiler
Are you aware you posted this question on a forum for AutoHotkey?