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.
try Call ProgramExit() or Call ApplicationExit() at the end of the script.
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..
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
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
miraculously the function
worked fine once i changed my batchfile using an adaptable working directory for the script:
set script="%~dp0\ConvertDATtoMAT.VBS" start "" %program% "/cScriptStart('"%script%"')"