08-11-2009 09:45 AM
hi,
i am using labview and calling a cmd prompt window (syst exec) and executing a command.
upon completion of the command, i am able to read the contents of the cmd prompt window.
the problem is, i have to physically hit "control and c" on the keyboard to get the application to stop.
i seem unable to automatically send the "control c" (03) to the cmd prompt, in order to stop it, while it is executing.
anyone have any idea's?
thanking you in advance.
Solved! Go to Solution.
08-11-2009 09:50 AM
I'm sure there's a better way to do this, but you could generate a user event.
You could programmatically have the computer press ctrl+c
08-11-2009 10:05 AM
i have tried to send control c programmatically, but the cmd prompt window seems to disregard the command.
08-11-2009 11:07 AM
It sounds like you are loosing the focus of the window. I assume you are using the windows utils?. See picture. This works for me.
08-12-2009 11:51 AM
hi again,
i had some time to try out what you suggested.
the command i am running, does not seem to want the control c command in the dos prompt window.
i set the cmd window to top, and i send along the control c to break the loop, but it doesn't get accepted.
but, when i physically hit control and c on my keyborad it breaks the loop. (it does not register in the cmd window)
is there another way to do this?
thanking you in advance.
08-13-2009 10:14 AM
Hi,
Can you please post a screenshot of your code? Thanks!
Ipshita C.
08-13-2009 11:18 AM
hi,
i actually found a vi on ni that did the trick.
it's great.
wanna thank everyone for thier input.
have a great day and until we meet again,
take care.
08-13-2009 11:21 AM
08-13-2009 11:24 AM
here is the link...
hope it can help anyone who has the same problem.
http://forums.ni.com/ni/board/message?board.id=170&message.id=401151&requireLogin=False
08-13-2009 11:42 AM