Call a script within a script
Forums
Hi all,
I have created several scripts, one for each test. Now I want to run all of these scripts (or only some of them). My idea is to create a new script (maybe with option fields) from where I could start the other scripts. Is that possible?
Thank you,
Ole
Hi JHDCC, here are two
Hi JHDCC, here are two examples for you. The first doesn't send any parameters while the second sends parameters to the scripts. You can mix the two so you can have the first with no parameters and the second with paramers and so on.
'example of running a script with no parameters
Sub Main
'Run 4 scripts after each other.
Client.RunIDEAScript "Script1.ISS"
Client.RunIDEAScript "Script2.ISS"
Client.RunIDEAScript "Script3.ISS"
Client.RunIDEAScript "Script4.ISS"
End Sub
'example of running a script with up to four parameters
Sub Main
'Run 4 scripts after each other. Parameters would be of a string format.
Client.RunIDEAScriptEx "Script1.ISS", "arg1", "arg2", "arg3", "arg4" 'example of sending 4 parameters to the script being called
Client.RunIDEAScriptEx "Script2.ISS", "arg1", "arg2", "arg3", "" 'example of sending 3 parameters to the scirpt being called
Client.RunIDEAScriptEx "Script3.ISS", "arg1", "arg2", "", "" 'example of sending 2 parameters to the scirpt being called
Client.RunIDEAScriptEx "Script4.ISS", "arg1", "", "", "" 'example of sending 1 parameter to the scirpt being called
End Sub
Hi, there. I'm trying to
Hi, there. I'm trying to execute the example you post, Brian. I pasted all files in Macros.ILB folder, when I run the Main and click button 1 and 2, the message: "invalid macro file name" shows. I reviewed the Idea language reference and syntaxis is correct (compared to the examples it has). Please help.
Hi,
Hi,
I had this error too, but found the solution in the link below. The macros need to be in the project folder, not the macros folder.
http://ideascripting.com/comment/966#comment-966
Hi brian, is there a simple
Hi brian, is there a simple way to run macros/scripts with a master script, without all the buttons etc?
ie within the Macros.ILB folder, i have macro1.iss, macro2.iss ... up to say, macro20.iss
My aim is to run mastermacro.iss, which just calls macros 1-20 and runs them consecutively. I don't need any user involvement as the process is fixed and any changes would require a rewrite of the sub-macros.
Thanks for all your help. Great resource, but some of the scripts are a big jump from tweaking/altering a recorded macro, to the above. Any suggested reading/resources as a beginners guide to scripting/visualbasic?