LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Keyboard input to separate Win. application without pressing key

How can I run (communicate via keyboard) windows application for programming microcontrollers from LabView? I mean “pressing” Ctrl+P for starting programming with LabView without human action.
0 Kudos
Message 1 of 9
(5,476 Views)

I've linked an example program here that contains a subVI which simulates keyboard input. You could use it to simulate key strokes, but you would need to do something like an Alt+Tab in order to change key focus to another window. Honestly, controlling the application this way will be tedious and the unpredictability of window tabbing order could present problems. Does this application have an ActiveX (COM) interface? If so, I would recommend using ActiveX in LabVIEW to control the application.

Kind Regards,

E. Sulzer
Applications Engineer
National Instruments
0 Kudos
Message 2 of 9
(5,454 Views)

At home, I have program Girder http://www.promixis.com/products.php?section=girder, they don't need to change key focus to send keystroke to any running application.

0 Kudos
Message 3 of 9
(5,448 Views)
How about this?

___________________
Try to take over the world!
0 Kudos
Message 4 of 9
(5,444 Views)
Problem is how to simulate any keystroke in some open Windows application from LabView application
0 Kudos
Message 5 of 9
(5,439 Views)
@AESulzer
In Virtual key constant there is no Alt key to enter Alt+Tab.

Message Edited by Oldi on 10-14-2005 07:19 AM

0 Kudos
Message 6 of 9
(5,438 Views)
The G toolbox from George Zou has a tool that can do the job. I don't know how it will behave with hot keys that are used by the operating system, though. 
0 Kudos
Message 7 of 9
(5,423 Views)
Oldi,
 
In the example I directed you to, the virtual key "MENU" is equivalent to the Alt key.
 
E. Sulzer
Applications Engineer
National Instruments
0 Kudos
Message 8 of 9
(5,404 Views)
Thanks
 

With combination of Find Winodows.vi and Set Active Window.vi Demo from G Toolbox

and Emulate Keyboard.vi from copytext.zip I get a working VI, but it doesn't work if target application is in a Taskbar. If Application is only inactive, then everything is OK. Good enough.

Message Edited by Oldi on 01-04-2006 07:21 AM

0 Kudos
Message 9 of 9
(5,284 Views)