Link to home
Start Free TrialLog in
Avatar of mds332200
mds332200

asked on

How can I run an exe script file multiple times in vb6?

Hi, I use some scripts to automate the editing of my database (the scripts are .exe files). Whenever I add an item to my database, I put the item into the system, (its a database file so I use excel to edit the database) but when I enter the info in, to save time I just the item name.  Then every week or so I edit all the recent items I added (theres like 20 fields which have to be modified per entry). So I made a script which automates this process. My question is I was wondering is there an easy way to specify how many times an exe file with a time delay between each time it runs.

Since I add anywhere from 0-200 items to the database every week, each week the number of times the script is ran changes.  

I wish there was an option to say run this script 148 times and it will loop itself 148 times. Currently I edit the script and use Copy and paste then save the script file and compile it to an exe file and run it. The only times I have problems are when I lose count  if I accidentally paste an extra script in it will mess up a record (if I need it to revise 50 items and its pasted 51 times, the 51st item will be messed up). And if I miss a paste and paste 49 times lets say, then I need to edit the script to only run once, save and run it.

I know how to use visual basic 6 a little, so it would be cool if I can load a script in vb6 and type in a value- and have it run that script that many times. For example I can press a button and browse to the directory on my computer c:/scripts and select the script I need, then in another box type in 50 for example, and press ok and have that script run 50 times.

A problem is that if it ran like that, a timer would need to be involved because if I said to run a script 50 times, all the scripts may load at once. It would be important that the second script launches after the first script has ran and the process has been completed.

I made a sample of what the program looks like, see it below

Does anyone have any advice on the coding? It looks like it should be easy, but I havent used VB in an advanced way like this since high school a few years ago. Any help would be appreciated.

Image4.jpg
ASKER CERTIFIED SOLUTION
Avatar of dentab
dentab
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mds332200
mds332200

ASKER

Thanks for the help!