Edgarspohuj Posted March 31, 2018 Posted March 31, 2018 Hi 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. Thanks 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) Else 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) EndIf WEnd EndFunc
Developers Jos Posted March 31, 2018 Developers Posted March 31, 2018 ... and this thread is totally unrelated to your previous closed topic ...right? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Edgarspohuj Posted March 31, 2018 Author Posted March 31, 2018 4 minutes ago, Jos said: ... and this thread is totally unrelated to your previous closed topic ...right? Jos 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.
Moderators JLogan3o13 Posted March 31, 2018 Moderators Posted March 31, 2018 @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: Quote 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 "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!
Edgarspohuj Posted April 1, 2018 Author Posted April 1, 2018 No problem. I solved my problem with Python language. Was much easy to use. Syntax is more similar for what i learn before.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now