01-29-2014 06:53 AM
Hi I am executing a couple old DOS based exe programs. Two programs that run one after the other then loop and do it over again (variables are changed each loop) The first exe program requires the user to "press any Key" to terminate it (close the CMD window. When I run my VI using the system.exe sub-VI to run the DOS programs I have to "press any key" to close the window and allow my VI to continue looping. Or if I use the "Wait until completion" option I end up with a bunch of CMD windows to close at the end. There must be a simple way to "fake a key hit" Plan B is to train a small monkey to sit infront of the key board......
I using Labview 2013 on windows XP / 7
thanks
Solved! Go to Solution.
01-29-2014 07:45 AM - edited 01-29-2014 07:47 AM
01-29-2014 07:50 AM
Check out this post. If that doesn't work for you, you can try using SendKey in a Powershell script. Good luck.
Full disclosure, I have done neither of these, so cannot vouch for their usefulness.
01-29-2014 08:31 AM - edited 01-29-2014 08:32 AM
Many thanks, that did the trick, I just used the Keyup VI and used one of the random keys it used, added a smalll delay so the DOS program could finish! - the Monkey can go back to the pet store, he could never find that "Any Key" button anyway!