Sign in to follow this  
Followers 0
pdark1987

about pixelsearch and array

6 posts in this topic

#1 ·  Posted (edited)

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



Can you please explain more about what you're trying to accomplish? I can almost guarantee you there is an easier way that with PixelSearch.


√-1 2^3 ∑ π, and it was delicious!

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

pretty obivous, this is about game automation...


ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

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.


√-1 2^3 ∑ π, and it was delicious!

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  
Followers 0