Help with image search

Get help with using AutoHotkey and its commands and hotkeys
IHAT
Posts: 5
Joined: 09 Feb 2018, 09:59

Help with image search

16 Feb 2018, 17:18

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
User avatar
boiler
Posts: 3089
Joined: 21 Dec 2014, 02:44

Re: Help with image search

16 Feb 2018, 20:19

Are you aware you posted this question on a forum for AutoHotkey?

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], BreezeB, jemmm, marcefw and 215 guests