Image searching issues

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
gnastie
Newbie
Posts: 5
Joined: Thu May 14, 2020 3:38 am

Image searching issues

Post by gnastie » Fri May 22, 2020 11:52 pm

Alright, so I posted that repeated image searching thing a while back and Marcus, you said to use the "WaitScreenImage" command. I haven't had a problem with the "WaitScreenImage" but I have had a problem with the "FindImagePos". I have used debug, I have looked at the values it's producing or the lack thereof, I tried using exact and correlation coefficients, I tried making an entirely new script and capturing a new image. I can not figure out for the life of me what is wrong with this script! I believe it just cannot find the image despite it being on the screen. Here is the code that for some reason, will not work.

Code: Select all

Label>bbah
//Find and Left Click Center of 
FindImagePos>%BMP_DIR%\image_1.bmp,WINDOW:Growtopia,0,1,XArr,YArr,habb,EXACT
If>habb>0
Wait>.75
  MouseMove>XArr_0,YArr_0
  LDown
  Wait>.15
  LUp
Endif
If>habb=0
Goto>bbah
Endif
That obviously isn't the whole script, but I made sure I don't have any "Num Found Var" the same on other image finding commands. So basically making it search until it finds the image. I did this instead of "WaitScreenImage" in this particular case because I wanted the script to once it found the image on the screen place the cursor on the image. I tried adding in wait time just to see if anything would be fixed, to no avail. The mouse literally just sits on my screen flashing whilst the image is on the screen like it's still waiting for the image to appear

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts