Jump to content
Sign in to follow this  
pdark1987

about pixelsearch and array

Recommended Posts

Func IMR11()
      Do
      sleep(100)
      $pix11 = PixelSearch(127, 538, 127, 538, 0xE4925F);     
      $pix111 = PixelSearch(127, 538, 127, 538, 0xAB623E);   
      Until IsArray ($pix11) or IsArray ($pix111)
      sleep(100)
      MouseClick("left",127, 538,1,10)
      sleep(150)
      IMR12() 
   EndFunc

question about stuff in the red, is that the best way to do it?

or is possible for me to write do until isarray and it search one of those values or increase if have more?

instead of writing

until isarray ($pix11) or isarray($pix111)

and write

until isarray ($pix11)  ; and $pix11 as all the other pixel values? or do have to seperate it like i just did in my code?

Edited by pdark1987

Share this post


Link to post
Share on other sites

agreed. Pixelsearching is horrible when trying to automate something. The slightest shift in the screen can break the script, a window in front of a window can break it, you get the idea.

Odds are we have the app automated already and we can just point you to a script that has what you need. Whats the name of the application?

Share this post


Link to post
Share on other sites

It may not be game automation. We need to hear from the original poster before passing judgement. I've seen where pixelsearching was the only option to solve a problem. It is rare when it happens but it is possible.

Share this post


Link to post
Share on other sites

pretty obivous, this is about game automation...

 

It's not obvious, or we wouldn't have asked. As Bert says, there are some instances where it makes sense. There also may be simply a lack of familiarity with other ways of doing it. Making an assumption based on 0 facts, as you're doing, benefits no one.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...