notakiller Posted April 3, 2006 Share Posted April 3, 2006 hi guys i did that script based on color changes (to pick items ...) and yet its not working properly ... i want it to scan those points and when something changes there it picks it ... but if it dont find a color change it has to scan the rest of the places ... now when it scan 1 place that changes it starts to try to pick all the rest 2 heres the scriptWhile 1$checksum = PixelChecksum(140,245,142,247)While $checksum = PixelChecksum(140,245,142,247)Sleep(100)$checksum = PixelChecksum(171,231,173,233)While $checksum = PixelChecksum(171,231,173,233)Sleep(100)$checksum = PixelChecksum(194,222,196,224)While $checksum = PixelChecksum(194,222,196,224) Sleep(100)$checksum = PixelChecksum(296,166,298,168)While $checksum = PixelChecksum(296,166,298,168) Sleep(100)$checksum = PixelChecksum(330,151,332,153)While $checksum = PixelChecksum(330,151,332,153) Sleep(100)$checksum = PixelChecksum(351,139,353,141)While $checksum = PixelChecksum(351,139,353,141) Sleep(100)$checksum = PixelChecksum(408,144,410,146)While $checksum = PixelChecksum(408,144,410,146) Sleep(100)$checksum = PixelChecksum(424,151,426,153)While $checksum = PixelChecksum(424,151,426,153) Sleep(100)$checksum = PixelChecksum(571,218,573,220)While $checksum = PixelChecksum(571,218,573,220) Sleep(100)$checksum = PixelChecksum(599,235,601,237)While $checksum = PixelChecksum(599,235,601,237) Sleep(100)WEndMouseMove(599,235)MouseDown("left")MouseUp("left")Sleep(500)MouseMove(639,302)MouseDown("left")MouseUp("left")Sleep(11000)WEndMouseMove(571,218)MouseDown("left")MouseUp("left")Sleep(500)MouseMove(610,246)MouseDown("left")MouseUp("left")Sleep(11000)WEndMouseMove(424,151)MouseDown("left")MouseUp("left")Sleep(500)MouseMove(464,179)MouseDown("left")MouseUp("left")Sleep(11000)WEndMouseMove(408,144)MouseDown("left")MouseUp("left")Sleep(500)MouseMove(448,172)MouseDown("left")MouseUp("left")Sleep(11000)WEndMouseMove(351,139)MouseDown("left")MouseUp("left")Sleep(500)MouseMove(391,167)MouseDown("left")MouseUp("left")Sleep(11000)WEndMouseMove(330,151)MouseDown("left")MouseUp("left")Sleep(500)MouseMove(370,179)MouseDown("left")MouseUp("left")Sleep(11000)WEndMouseMove(296,166)MouseDown("left")MouseUp("left")Sleep(500)MouseMove(336,194)MouseDown("left")MouseUp("left")Sleep(11000)WEndMouseMove(194,222)MouseDown("left")MouseUp("left")Sleep(500)MouseMove(234,250)MouseDown("left")MouseUp("left")Sleep(11000)WEndMouseMove(171,231)MouseDown("left")MouseUp("left")Sleep(500)MouseMove(211,259)MouseDown("left")MouseUp("left")Sleep(11000)WEndMouseMove(140,245)MouseDown("left")MouseUp("left")Sleep(500)MouseMove(180,273)MouseDown("left")MouseUp("left")Sleep(11000)WEnd Link to comment Share on other sites More sharing options...
greenmachine Posted April 3, 2006 Share Posted April 3, 2006 That looks like way too many nested While loops. Start by looking at your code with correct indentation and see if anything seems wrong to you. If you really want it to look like that (which I really doubt), you really should change the variable names. What I suspect is the case is that you want a big loop to go on the outside, with each check and reaction on the inside. expandcollapse popupWhile 1 $checksum = PixelChecksum(140,245,142,247) While $checksum = PixelChecksum(140,245,142,247) Sleep(100) $checksum = PixelChecksum(171,231,173,233) While $checksum = PixelChecksum(171,231,173,233) Sleep(100) $checksum = PixelChecksum(194,222,196,224) While $checksum = PixelChecksum(194,222,196,224) Sleep(100) $checksum = PixelChecksum(296,166,298,168) While $checksum = PixelChecksum(296,166,298,168) Sleep(100) $checksum = PixelChecksum(330,151,332,153) While $checksum = PixelChecksum(330,151,332,153) Sleep(100) $checksum = PixelChecksum(351,139,353,141) While $checksum = PixelChecksum(351,139,353,141) Sleep(100) $checksum = PixelChecksum(408,144,410,146) While $checksum = PixelChecksum(408,144,410,146) Sleep(100) $checksum = PixelChecksum(424,151,426,153) While $checksum = PixelChecksum(424,151,426,153) Sleep(100) $checksum = PixelChecksum(571,218,573,220) While $checksum = PixelChecksum(571,218,573,220) Sleep(100) $checksum = PixelChecksum(599,235,601,237) While $checksum = PixelChecksum(599,235,601,237) Sleep(100) WEnd MouseMove(599,235) MouseDown("left") MouseUp("left") Sleep(500) MouseMove(639,302) MouseDown("left") MouseUp("left") Sleep(11000) WEnd MouseMove(571,218) MouseDown("left") MouseUp("left") Sleep(500) MouseMove(610,246) MouseDown("left") MouseUp("left") Sleep(11000) WEnd MouseMove(424,151) MouseDown("left") MouseUp("left") Sleep(500) MouseMove(464,179) MouseDown("left") MouseUp("left") Sleep(11000) WEnd MouseMove(408,144) MouseDown("left") MouseUp("left") Sleep(500) MouseMove(448,172) MouseDown("left") MouseUp("left") Sleep(11000) WEnd MouseMove(351,139) MouseDown("left") MouseUp("left") Sleep(500) MouseMove(391,167) MouseDown("left") MouseUp("left") Sleep(11000) WEnd MouseMove(330,151) MouseDown("left") MouseUp("left") Sleep(500) MouseMove(370,179) MouseDown("left") MouseUp("left") Sleep(11000) WEnd MouseMove(296,166) MouseDown("left") MouseUp("left") Sleep(500) MouseMove(336,194) MouseDown("left") MouseUp("left") Sleep(11000) WEnd MouseMove(194,222) MouseDown("left") MouseUp("left") Sleep(500) MouseMove(234,250) MouseDown("left") MouseUp("left") Sleep(11000) WEnd MouseMove(171,231) MouseDown("left") MouseUp("left") Sleep(500) MouseMove(211,259) MouseDown("left") MouseUp("left") Sleep(11000) WEnd MouseMove(140,245) MouseDown("left") MouseUp("left") Sleep(500) MouseMove(180,273) MouseDown("left") MouseUp("left") Sleep(11000) WEnd Link to comment Share on other sites More sharing options...
notakiller Posted April 3, 2006 Author Share Posted April 3, 2006 (edited) wow thx for the fast reply mmm yeah in that structure its way better lol thanks alot also another question >< im creating a bot, ... i dont think pixelcheksum is the best way to make my bot work ... i need it to detect when an area is able to be used and just go to it any suggestion (like to go fishing when theres like flies on the water) thanks alot Edited April 3, 2006 by notakiller Link to comment Share on other sites More sharing options...
greenmachine Posted April 3, 2006 Share Posted April 3, 2006 Sounds like a World of Warcraft bot... might want to try searching the forums first. I'm not really sure how well pixelchecksum will work in that case...Also, I suggest getting Scite (code editor with formatting, coloring, etc) and beta (more functions, better stuff) to improve your program.http://www.autoitscript.com/autoit3/files/beta/autoit/http://www.autoitscript.com/autoit3/scite/downloads.php Link to comment Share on other sites More sharing options...
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