01-19-2006 08:56 AM
Hi,
I'm trying to find a quick () way of stopping Dasylab from the command line e.g. from an external script file.
I can STOP Dasylab via a VB Windows based DDE utility (produced by NI/DasyTec), but I need the same degree of control from the command line.
I have several DDE command line utilities, namely TCMD.exe & CMCDDE.exe but none of these work with Dasylab ….even though they control other DDE servers without problem!
Any ideas??
Thanks,
Paul Towle.
Luk Leamington
01-24-2006 08:15 AM
Hello all.
This has now been solved .....thanks to Thomas Gebbert at Measx.com.
It only requires a Visual Basic Script file.
Place the following in a file (e.g. named 'Dasylab_STOP.vbs)' & execute from the command line or another script/batch file.
Regards all,
Paul T.
=========================================================================================
Start
Sub Start
'Nun alle weiteren Prozeduren/Funktionen hier aufrufen.
TastenSimulation 'Für DASYLab-Stop.
End Sub
Sub TastenSimulation
Dim WshShell
set WshShell = WScript.CreateObject("WScript.Shell")
'In Überschriftszeile steht immer u.a. ein DASYLab.
WshShell.AppActivate "DASYLab"
' Tastaturanschläge durchführen.
' 'Enter'-Taste = ~; 'STRG+F5'-Taste = ^{F5};
WshShell.SendKeys "~"
WshShell.SendKeys "^{F5}"
End Sub
01-26-2006 11:37 AM
You can use the datasocket to do this. Launch the datasocket serveur. Read in Dasylab the status of the boolean "samplebool". If he changes, generate an action to stop Dasylab. Now you can use any language supporting ActiveX to set or reset this flag ( VB, Labview ...) and do a very small program (.exe) you can launch as a command line.
See joined a small exemple in labview