Sign in to follow this  
Followers 0
Looney

Repeat a Script

6 posts in this topic

Hello,

I am very new to scripting, And i have a question about repeating a section of a script. I want to repeat this section of my script 11 times, But i dont know how....

Sleep (30000)

MouseClick("left", 341, 614, 1)

Sleep (30000)

MouseClick("left", 341, 614, 1)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hello Looney,

First, Welcome to the AutoIt Forums ;)

Read the Help File about Loops, you can make it work in just about any look, While, Do, For.

This one is the simplest for your posted needs:

For $i=1 to 11
    Sleep (30000)
    MouseClick("left", 341, 614, 1)
    Sleep (30000)
    MouseClick("left", 341, 614, 1)
Next

Realm

Edit: Fixed typos

Edited by Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry.  

Share this post


Link to post
Share on other sites

Thank you it is working !

Share this post


Link to post
Share on other sites

Hello Looney,

First, Welcome to the AutoIt Forums ;)

Read the Help File about Loops, you can make it work in just about any look, While, Do, For.

This one is the simplest for your posted needs:

[size=2]For $i=1 to 11[/size]
    Sleep (30000)
    MouseClick("left", 341, 614, 1)
    Sleep (30000)
    MouseClick("left", 341, 614, 1)
[size=2]Next[/size]

Realm

Nice tags! :)

Thank you it is working !

Welcome to the realm of AutoIt. Please enjoy your stay.

AutoIt Stuff:

 

UDFs: {Grow}

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Nice tags! ;)

I have recently decided to give Google Chrome a try, and for some reason, it keeps messing with my posts, and I forgot to double check for that!

Thank you it is working !

My Pleasure, I had the time :)

Edit: Fixed Chrome garbage additions

Edited by Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry.  

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  
Followers 0