Jump to content

Pixelsearch and repeat

Recommended Posts


I write small code for pixelSearch with if and else.  I add message box to just test if code is going where it need. But i still have one problem. Code tray find color. If its not there he press refresh on MouseClick. But when color shows on screen code continuous pressing refresh not looking if there is color is true. How to make it like loop? Tray find color, if not press refresh, sleep and tray find color over and over till its find and do other thinks.




While 1
   $coord = PixelSearch (618,374,618,378,0xFF0000)
if @error = 0 Then
   MouseClick ("Left",524,212,1)
   Sleep (2000)
   MouseClick ("Left",687,303,1)
   Sleep (1000)
   MouseClick ("Left",691,326,1)
   MouseClick ("Left",114,155,1) ; Press refresh
   Sleep (2000)
   $coord = PixelSearch (618,374,618,378,0xFF0000)
($MB_SYSTEMMODAL, "Title", "This message box will timeout after 10 seconds or select the OK button.", 10)

Share this post

Link to post
Share on other sites
4 minutes ago, Jos said:

... and this thread is totally unrelated to your previous closed topic ...right?


I just tray to understood how PixelSearch need to work. Maybe in last post i put misstake. Did't know about gaming. If we wanna be clear i don't play games.I just learn this program. I just take that page because that looks hard for me. I check tutorials about games or g-mail auto log in and so on. That all was super easy. But in that page wasnt names of button and so on. Im really sorry if you think i really want that for cheating and stuff. Just wanna learn program.

Share this post

Link to post
Share on other sites

@Edgarspohuj, do you seriously believe the moderation team hasn't heard the whole "I'm only using this to learn, I just happened to pick a game as my way to learn" lame excuse 1000 times before? How about a detailed explanation of what you do want to accomplish, and why you need to use PixelSearch? Make it good, as the rules are clear:


Do not repost the same question if the previous thread has been locked - particularly if you merely reword the question to get around one of the prohibitions listed above


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

  • Create New...