LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Contrrolling other active applications

Can LabVIEW write alt + 'x' commands to another active Windows application running on the PC?  If so, are there any example vi's that are available?

 

Many thanks

Alan

0 Kudos
Message 1 of 5
(2,972 Views)

Search the forum for "SendKey" or "SendInput" or even just "send keyboard".

 

This question gets asked a lot, and there have been several examples posted. 

0 Kudos
Message 2 of 5
(2,960 Views)

smercurio_fc

smercurio, using the Windows API user32.dll I can make my other Window application 'TOP', and then I can write keybord commands like Alt, and any of the underlined pull down menu commands to control that Window.  It's great, however, after I write even one keyboard character to the other Window, and then double click on any desktop ICON, or Explorer directory, instead of opening the shortcut, or directory, the properties message box for that ICON, or directory pops up.  I can right click, and choose 'Open' successfully.  To exit this 'mode' all I have to do is manually press the Alt key.  I've tried a lot of user32 commands to try to exit this mode with LabVIEW, but have not been successful.  Have you encountered this before?  Is there a command to terminate the user32.dll, or restore the double click mouse function?

 

Thanks, Alan

0 Kudos
Message 3 of 5
(2,893 Views)
That sounds like you Alt key is stuck. You can't "terminate" user32.dll - it's just a DLL. My guess is it's something you're doing in your code. If you upload it then someone can take a look at it.
0 Kudos
Message 4 of 5
(2,889 Views)

Got it, one command to press Alt, and one to release it.

 

Alt.jpg

0 Kudos
Message 5 of 5
(2,879 Views)