Jump to content

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
Link to comment
Share on other sites

  • Moderators

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.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
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?

Link to comment
Share on other sites

  • Moderators

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.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...