02-24-2014 12:49 PM
Hello,
I am starting diadem from batch file with the startscript command line option to execute a VBS doing some stuff. Now the diadem comes up nicely and executes the VBS all fine. HOWEVER the diadem is started in fork/daemon mode meaning the batch is not waiting for it to finish the VBS script and doesnt CLOSE after the script automatically. Can I somehow do this in the VBS at the end automatically? Or can I do this via the batch file?
Solved! Go to Solution.
02-25-2014 05:43 AM - edited 02-25-2014 05:45 AM
Hello,
try Call ProgramExit() or Call ApplicationExit() at the end of the script.
gemu
02-27-2014 07:58 AM
Thanx for the hint
PLUS if you modified the data (most likely) be sure to set FileModification to "ignore" to avoid dialog asking whether to save data..
br
Thomas
08-02-2017 06:50 AM
Hello,
i´m doing a similar thing as Thomas. The proposed solution works fine in my script if i open the script with Diadem itself and run it, but not when the Batch-File starts Diadem via scriptstart command. When i use my Batchfile the script does what it is supposed to do but apparently commands like
Call ProgramExit()
and
Call ApplicationExit()
seem to be neglected. Diadem doesn´t close after finishing the script. Does it have to do with how the Batch-File opens Diadem?
This is how the Batchfile looks like:
@echo off set program="C:\Program Files (x86)\National Instruments\DIAdem 2014\DIAdem.exe" set script="ConvertDATtoMAT.VBS" start "" %program% "/cScriptStart('%script%')"
thanks a lot
Eagle123
09-20-2017 07:30 AM
Hello again,
miraculously the function
Call ProgramExit()
worked fine once i changed my batchfile using an adaptable working directory for the script:
set script="%~dp0\ConvertDATtoMAT.VBS" start "" %program% "/cScriptStart('"%script%"')"
Cheers
Eagle123