Jump to content
Sign in to follow this  
tweaker

How do you repeat?

Recommended Posts

tweaker

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)

Share this post


Link to post
Share on other sites
Kogmedia

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 by Kogmedia

[font="Verdana"]Keith (Kogmedia)[/font]My ScriptQuick Search - Internet / Hard Drive Search

Share this post


Link to post
Share on other sites
Paulie

While 1
;Your Script
WEnd

~Permanent Loop...

Share this post


Link to post
Share on other sites
tweaker

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!

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
Sign in to follow this  

×