Jump to content
Sign in to follow this  
freelancer

loop for multiple times

Recommended Posts

freelancer

Hi,

I was wondering if anyone could help me out with a loop command.

I'm trying to run a specific function multiple times. I don't want an infinite loop however. I just want to run it for 30 times.

In another "macro language" it was something like this:

Loop, 30

{

function1()

function2()

}

Can anyone 'translate' this into AutoIt ? I'm using v3.

thanks in advance.

Share this post


Link to post
Share on other sites
GaryFrost

Hi,

I was wondering if anyone could help me out with a loop command.

I'm trying to run a specific function multiple times. I don't want an infinite loop however. I just want to run it for 30 times.

In another "macro language" it was something like this:

Loop, 30

{

function1()

function2()

}

Can anyone 'translate' this into AutoIt ? I'm using v3.

thanks in advance.

for $x = 1 to 30

  function1()

  function2()

next

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites
freelancer

Great, thanks a lot! One question: is that it? You're creating the variable $x and using the for statement, shouldn't it be in a greater part then?

Edited by freelancer

Share this post


Link to post
Share on other sites
/dev/null

Great, thanks a lot! One question: is that it? You're creating the variable $x and using the for statement, shouldn't it be in a greater part then?

Hi freelancer, you should read the following section of the help file:

AutoIT -> Language Reference -> Loop Statements.

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites
freelancer

I didn't understand that part up until now with that example, thanks indeed.

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  

×