Pulsonix User Forum

Technical advice from Pulsonix engineers and the wider community.

Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help with using Pulsonix
 Scripting
 Start Scripts via Command Line with arguments
Author Previous Topic Topic Next Topic  

toko_23

Germany
5 Posts

Posted - 03 Jan 2014 :  13:45:53  Show Profile  Reply with Quote
Hi,

I use the command line to start a script (VB Script) like :

C:\Program Files (x86)\Pulsonix\Pulsonix.exe -hidden -scriptfile "myscript.vbs"

I want to use the script as a "Master-Script", so I would like to start the script with arguments from the command line, for example :

...Pulsonix.exe -hidden -scriptfile "myscript.vbs -design 12345"

The script should read out the argument "design" with it's value 12345 and fill an internal variable.

Is this possible ?

At this moment, I use a workaround. I generate in realtime a .vbs script which i load to pulsonix like the command above with the design filename I need. So I don't have to generate a vbs file for each design.

Torsten

bpb

9 Posts

Posted - 04 Jan 2014 :  07:48:24  Show Profile  Reply with Quote
I'm haven't found a way to pass the args via command line, but it is simple to overcome this using environment variables (in JavaScript):


var WshShell = new ActiveXObject("WScript.Shell");
var WshEnv = WshShell.Environment("Process");
var docname = WshEnv("PULSONIX_DOC");


Then just wrap invocation in the .bat file which sets appropriate variables from command line arguments and you're done.
Go to Top of Page
  Previous Topic Topic Next Topic  
Jump To: