Quick question, is it possible to call a script from within a script. I have a script which opens up 29 applications (one at a time) gets the information from these and then dump the text to a file. I want to run these from a spreadsheet to tell me which application to open.
The problem is that when i run these in Batch mode the start up script only loops on the applications not on the whole batch runner.
When you say "call a script" you really mean "call an action", right?
Yes, you can call reusable actions from within other actions, even if those reusable actions are not part of the current script (in which case they are external reusable actions).
Take a look at the RunAction statement in the helpfile. It will tell you all you need to know.
As for me, I create one parent action that I usually call "Main". The Main DataTable sheet contains a list of every action that this script will ever call. The first column is the "Run" column and the second column is the name of the reusable actions. If I want to skip any of those reusable actions, I leave those rows blank in the "Run" column, otherwise I make sure the "Run" column is not blank for any action that I want to run.
When I run my script, it runs the Main action and iterates through the rows of my datatable, running the actions I have selected and skipping the ones I want skipped. I can change which to run/skip by simply editing that "Run" column.
Then I put an Exittest statement at the end (the very last line) of my "Main" action so it doens't move on and run any other actions in this script.
And that's it, runs each action once, easy to maintain, never loops on the wrong thing, and I never have to run it in batch mode.
"The last 10% of any software project will take 90% of the budgeted time. The first 90% will take the other 90%"