Sign in to follow this  
Followers 0
dantimatter

running an application in a loop

7 posts in this topic

Hello All,

I've just started playing with AutoIt. I'm hoping that someone reading this forum has an idea or two that might help me with my problem.

I need to run a particular program 40,000 times, each time on a file with an incrementally increasing filename (e.g., filename00001.txt, filename00002.txt, ... , filename40000.txt). Is there a 'for' loop or similar construct in AutoIt that would allow me to do this? If so, all I would need to do is put something like the following operations inside the loop:

1. Run the program executable.

2. Select open file.

3. Paste the filename into the dialog box.

4. Make the program do it's thing.

5. Save the results to a text file.

6. Close the program.

7. Increment the filename for the next run.

Any thoughts on how to do this? I'm hoping that it's possible and simple to write up.

Thanks!

Share this post


Link to post
Share on other sites



Dog at your help file? ;)

All seriousness aside, did you even open the help file (AutoIt3.chm)?

:evil:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Dog at your help file? ;)

All seriousness aside, did you even open the help file (AutoIt3.chm)?

:evil:

As a matter of fact, I did open the help file and I went through the tutorials. I imagined that I would get suggestions or a solution more quickly from this community of experts than I would from my struggling through the rest of the file.

Share this post


Link to post
Share on other sites

Almost all functions have example scripts included with their entry in the help file. Like For/Next, Run(), WinWait(), ControlSend(), and ControlClick().

The tutorial demo for installing WinZip illustrates several key points, and then there is the tutorial linked in my sig.

;)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

If I were carrying out such a task, the first function I would read up on is _FileListToArray()

that's perfect! thanks!

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