Looney Posted October 22, 2010 Posted October 22, 2010 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)
Realm Posted October 22, 2010 Posted October 22, 2010 (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 October 22, 2010 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.
cembry90 Posted October 22, 2010 Posted October 22, 2010 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}
Realm Posted October 22, 2010 Posted October 22, 2010 (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 October 22, 2010 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.
Mison Posted October 25, 2010 Posted October 25, 2010 Hi OP, You can also use Function. Call it whenever you want to. FuncName() ; call it once For $i=1 to 11 ; call it 11 times FuncName() Next Func FuncName() Sleep (30000) MouseClick("left", 341, 614, 1) Sleep (30000) MouseClick("left", 341, 614, 1) EndFunc Hi ;)
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