Pulsonix User Forum

Technical advice from Pulsonix engineers and the wider community.

 All Forums
 Help with using Pulsonix
 Scripting
 Start Scripts via Command Line with arguments

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON

   Upload a file

Check here to subscribe to this topic.
   

T O P I C    R E V I E W
toko_23 Posted - 03 Jan 2014 : 13:45:53
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
1   L A T E S T    R E P L I E S    (Newest First)
bpb Posted - 04 Jan 2014 : 07:48:24
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.