Hi, I would like to know what this line of code does: REG.image.image_region:existsClick("image.png", 1) Does it search for the image at the region from REG.image.image_region, I know existclick kind of searches the whole screen for it? If so does make ankulua search for the image again before clicking?
Try using Region, narrow your search region on the screen to a specific area instead of entire screen everytime.
reg = Region(0,0,400,400) --this region would be starting at x,y(top left corner), then the area size is in pixels, in our case 400,400 pixels. adjust as needed for your specific part of the screen you need to search.
existsClick('image.png') --searches entire screen
reg:existsClick('image.png') --searches on our specific area and is now faster.
And yes similar works with the other methods as well, like exists, existsClick, findall, and others but they works the same way stack the syntax on the end using : and make sure your brackets are right.
Or I can only use if statement, i.e if reg:exists('image.png') or reg:exists('image1.png') then...
Because I'm actually search for 3 possible images. If either one appears then the set action will be done. But these image appear for a short amout of time(~1s) and searching for these images if unlucky, do take abit longer than 1s and might miss them all.