| View previous topic :: View next topic |
| Author |
Message |
apollonius
Joined: 24 Jul 2007 Posts: 27 Location: Switzerland
|
Posted: Fri Nov 02, 2007 1:38 am Post subject: Exchange parameters/variables between scripts |
|
|
Hi
Can I somehow pass parameters from one script task to another. In other words, can a script call another script task with some variables?
like: Script.run(someScriptTask [var1, var2]).
Alternatively, can a script task define (set) a User Variable "on the fly", i.e. without having to execute a separate command-line command?
Many thanks and regards,
Silvan |
|
| Back to top |
|
 |
apollonius
Joined: 24 Jul 2007 Posts: 27 Location: Switzerland
|
Posted: Fri Nov 02, 2007 1:39 am Post subject: |
|
|
By the way, I'm using Automize Enterprise 7.26 on production and 7.40 on the test system.
Regards,
Silvan |
|
| Back to top |
|
 |
Robert Site Admin
Joined: 25 May 2006 Posts: 1140
|
Posted: Fri Nov 02, 2007 8:31 am Post subject: |
|
|
1) Yes, you should be able to run a 2nd script from within a script though I have never tried it.
2) // set a user variable value
Script.setVar("newVariable", "variable testing" );
String value = Script.getVar("newVariable");
Script.out("New Variable value = " + value );
3) You can also use a set variables task released in 7.36 - here you would have to set the task parameters.. then call the task to set the variable.. but obviously 2) above is simpler..
Patch ID = 7.36 - Use with Versions 7.00 or later ONLY
Patch release date: 08/14/07
* New Set Variable task added. Previously user variables could only be set via commandline. |
|
| Back to top |
|
 |
apollonius
Joined: 24 Jul 2007 Posts: 27 Location: Switzerland
|
Posted: Fri Nov 02, 2007 8:44 am Post subject: |
|
|
Hi Robert
Thanks for this quick reply. I'll try this.
The efficient help always provided here is much appreciated!
Regards,
Silvan |
|
| Back to top |
|
 |
|