Jump to content

running an application in a loop


Recommended Posts

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!

Link to comment
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.

Link to comment
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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...