DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

scriptstart with parameters

Is it possible, to start a VBscript with any parameter that can influence the execution of the script?

The script should start by a shorcut on Desktop (e.g.  "Diadem.exe /CScriptstart("ScriptName") ) or by a start-icon in Diadem. The script should branch it's run depending a startparameter.  (e.g. run with or without access to a certain hardware.)


Martin Bohm
bohm@a3m.com
0 Kudos
Message 1 of 3
(3,207 Views)

Hallo Mr. Bohm

The easiest way is probably just to call two different scripts.  One ScriptNameWithHardware and one ScriptNameWithoutHardware.

It's also possible to call commands other than ScriptStart from the command line.  For example /Cb1:=true would cause the DIAdem global variable b1 to take the value true.  You could theoretically use this to call a user command with a parameter.  You'd have to register your user command beforehand though.  The registration of the user commands is saved in the desktop file.

Hope that helps,

Myrle

******************
For tips and tricks on creating VBScript DataPlugins go to http://dataplugins.blogspot.com.
0 Kudos
Message 2 of 3
(3,195 Views)
Thanks for your answer.

The use of two different scripts works of corse, but it has disadvantages. Any change on the script(s) has do be done on both.

Start Diadem with shortcuts on desktop like
    "C:\Programme\National Instruments\DIAdem 9.1\DIADEM.exe" /CT1:='A' /CScriptstart('test1')
works, the script can read and consider T1.

Start with two different starticons in Diadem works too. I wrote two startscripts for it:
    T1 = "A"                       'set Startparameter
    scriptstart("Test1")        'start script itself
and
    T1 = "B"                       'set Startparameter
    scriptstart("Test1")        'start script itself

The script "Test1" can run on two different ways depending on startparameter T1.
0 Kudos
Message 3 of 3
(3,186 Views)