04-19-2012 06:17 AM
Firstly, my apologies if this has been covered before.
I have a routine (written in LV7.1) that launches some third party software, using the System Exec.vi. When my code ends, I close this software using the Quit Application.vi in Winevent.llb. However, sometimes this external software displays an error message in a separate window, which is of no interest to me, but if it appears, Quit Application fails since the window requires an OK button to be clicked on, before it will close. Is there any way I can make Quit Application override this, or do I need to terminate the process some other way?
I’d appreciate any thoughts.
Thanks
Bruce
04-19-2012 08:31 AM
There is no way to have that VI do that. You would need to simulate clicking on the dialog box (examples have been posted on using the Windows API to emulate clicking), or use the taskkill command.