BadBoyDeGekste Posted February 27, 2008 Share Posted February 27, 2008 (edited) $hai = PixelGetColor ( 435 , 150 ) if $hai = 0xFFFFFF then return to step 1 $lol = PixelGetColor ( 265 , 349 ) if $lol = 0xFFFFFF then MouseClick ( 300 , 600 , 1 , 250 ) Sleep ( 10000 ) MouseClick ( 300 , 600 , 1 , 250 ) sleep ( 1000 ) MouseClick ( 300 , 600 , 1 , 250 ) MouseClick ( "left" , 265 , 349 , 400 , 250 ) MouseClick ( "left" , 400 , 700 , 1 , 250 ) $rofl = PixelGetColor ( 400 , 700 ) if $rofl = 0xFFFFFF then Return To Step 11 Return To Step 1 I get the error line -1: Error: Unable to parse line why? and btw does teh IF stil work if I keep returning to step 11? grezz Edited February 27, 2008 by BadBoyDeGekste Link to comment Share on other sites More sharing options...
DW1 Posted February 27, 2008 Share Posted February 27, 2008 You are not using Return correctly. Check the help file. There is no goto command. AutoIt3 Online Help Link to comment Share on other sites More sharing options...
BadBoyDeGekste Posted February 27, 2008 Author Share Posted February 27, 2008 You are not using Return correctly. Check the help file.There is no goto command.can't you just like, help me?how do I make it return to a step then? Link to comment Share on other sites More sharing options...
Nutster Posted February 27, 2008 Share Posted February 27, 2008 (edited) Read the section of the help on loops and conditions. Let's see. Do ; Start a post-test loop Sleep(50) ; Just to give your CPU a break from this tight loop. You won't notice changes faster than this anyway. $hai = PixelGetColor ( 435 , 150 ) if $hai = 0xFFFFFF then ContinueLoop ; Goes back to start of loop $lol = PixelGetColor ( 265 , 349 ) If $lol = 0xFFFFFF then; It looks like you want all of this if the condition is true. MouseClick ( 300 , 600 , 1 , 250 ) Sleep ( 10000 ) MouseClick ( 300 , 600 , 1 , 250 ) sleep ( 1000 ) MouseClick ( 300 , 600 , 1 , 250 ) Endif MouseClick ( "left" , 265 , 349 , 400 , 250 ) MouseClick ( "left" , 400 , 700 , 1 , 250 ) $rofl = PixelGetColor ( 400 , 700 ) Until $rofl = 0xFFFFFF; Leave the loop if the condition is true; otherwise back to the top of the loop. Also, download the customized Scite editor and run a syntax check (any maybe tidy) before running the script. It will give you some advise to fix mistakes. Keep in mind, many games, especially on-line ones have ways of checking for bots and will lock you out if they catch you doing that. Edited February 27, 2008 by Nutster David NuttallNuttall Computer Consulting An Aquarius born during the Age of Aquarius AutoIt allows me to re-invent the wheel so much faster. I'm off to write a wizard, a wonderful wizard of odd... 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