tweaker Posted June 5, 2007 Share Posted June 5, 2007 I have an extremely simple MouseClick script I wrote, listed below. The only thing I don't know how to do is make it repeat itself. How do you do it? MouseClick("right",227,146,1) sleep( 500 ) MouseClick("left",290,210,1) sleep( 500 ) While (PixelGetColor(114,563) <> 16777215) sleep( 500 ) WEnd MouseClick("left",246,561,1) sleep( 1000 ) MouseClick("left",186,578,1) sleep( 1000 ) While (PixelGetcolor(954,853) <> 16777215) sleep( 1000 ) WEnd MouseClick("Left",954,853,1) sleep( 1000 ) While (PixelGetColor(759,549) <> 0x5FC0D5) sleep( 1000 ) WEnd MouseClick("Left",759,549,1) Link to comment Share on other sites More sharing options...
Kogmedia Posted June 5, 2007 Share Posted June 5, 2007 (edited) Will loop 3 time is that what you need? For $x = 0 to 3 MouseClick("right",227,146,1) sleep( 500 ) MouseClick("left",290,210,1) sleep( 500 ) While (PixelGetColor(114,563) <> 16777215) sleep( 500 ) WEnd MouseClick("left",246,561,1) sleep( 1000 ) MouseClick("left",186,578,1) sleep( 1000 ) While (PixelGetcolor(954,853) <> 16777215) sleep( 1000 ) WEnd MouseClick("Left",954,853,1) sleep( 1000 ) While (PixelGetColor(759,549) <> 0x5FC0D5) sleep( 1000 ) WEnd MouseClick("Left",759,549,1) Next Kog Edited June 5, 2007 by Kogmedia [font="Verdana"]Keith (Kogmedia)[/font]My ScriptQuick Search - Internet / Hard Drive Search Link to comment Share on other sites More sharing options...
Paulie Posted June 5, 2007 Share Posted June 5, 2007 While 1 ;Your Script WEnd ~Permanent Loop... Link to comment Share on other sites More sharing options...
tweaker Posted June 5, 2007 Author Share Posted June 5, 2007 Wow that's absolutely perfect. After running it now a few times apparently I need to look into if statements because there are times where something out of the norm can happen and what I'm trying to automate will kick me out. Thank you two both for this! 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