01-04-2011 03:12 AM
The script runs very very slow, more than if I open Diadem manually and I runs the script by F5.
I used Diadem 10.2, but if I used Diadem 11.0 the script runs slowly too, but not as much as Diadem 10.2
How I can fix this? Because I need to run with the .exe.
Thanks
Solved! Go to Solution.
01-04-2011 04:16 AM
Hello !!
I found that the problem of slow comming by this code:
Set ws = CreateObject("WScript.Shell")
If FileExist(AutoDrvUser&"XXX.exe") Then
Set VarApp = ws.Exec(AutoDrvUser & "XXX.exe")
While VarApp.Status=0
Call Pause()
Wend
End If
If VarApp.Status=0 then..
What Can I do?
01-04-2011 10:51 AM
Hi s.g.m.,
Hmmm, I haven't tried that particular Windows Shell method to run external *.exe programs. Usually if you're running a DIAdem VBScript and you want to run an external program, you use the "ExtProgram()" command. You can also use the "FilExist()" function to check if the *.exe" is present first. I've also had good luck with the Windows Shell method "Run".
Please give that a try and let me know if it runs faster,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
01-05-2011 01:54 AM
Hello Brad,
thank you for the question but I have one question, what is the way to control when program is finish?
01-05-2011 03:21 AM
Hello Brad,
I've solved the problem, I implemented a function that returns if XXX.exe is still running in task list of windows.
The function ExtProgram() run Diadem faster than the other function. I don't have problems now!
Thanks!!: