How can I get handle(s) to and poll non-LabVIEW window(s)/application(s) from LabVIEW?

How can I get handle(s) to and poll non-LabVIEW window(s)/application(s) from LabVIEW?

Post by sroger » Sat, 22 Dec 2007 04:10:05


Want to launch EXE from LabVIEW, wait for user to finish with EXE's UI, and once they closed it, return execution flow in LabVIEW. Cool, no problem.
Used the System Exec VI and with the "wait until completion" = TRUE the EXE never launches. Not sure why.
With the "wait until completion" = FALSE, the application runs with no problems, but now LabVIEW no longer waits.  Can't tell when user is done.
Work around idea... Once the Sys Exec VI launches the EXE, wait and poll some Windows API call to see when the window for the specific EXE closes. Cool.
I know G and no C.  What I would ideally like is a DLL, that I can wrap with the DLL Import Wizard.  Of course best would be a VI and the wrapped API call.
Any ideas?
 
 
 

How can I get handle(s) to and poll non-LabVIEW window(s)/application(s) from LabVIEW?

Post by Wieb » Sat, 22 Dec 2007 20:37:08

You could try it with a pipe. With a pipe you can open an exe, and interact
with it through a read and write reference. Although in your case the exe
might not start, since the normal sysexec doesn't start it...

http://www.yqcomputer.com/

Regards,

Wiebe.