LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change active window to exe called with command prompt

Hi, I am trying to send keyboard commands to an exe I open with systemexec. Once I open the exe, Labview regains active window status so the keystrokes are sent to the LabView window instead. How do I make the called exe the active window?? I am using Labview 12.

0 Kudos
Message 1 of 4
(5,605 Views)

Hi,

 

From what i understand, what you want to do is set a window frontmost.

 

There is an interesting thread on that topic:

http://lavag.org/topic/12751-how-do-you-make-your-application-window-frontmost/#entry76322

 

The two vi's posted by "Bean" worked great for me after some minor modifications.

 

The only bottleneck is that you need to know the exact name of the window you want to set frontmost.

 

Regards

0 Kudos
Message 2 of 4
(5,600 Views)

Ok, I've figured out how to make the called window active. Now I need to get its window handle so I can send the keyboard commands to that window. As written, the commands don't go to "cprog.exe"

 

0 Kudos
Message 3 of 4
(5,584 Views)

Ok, I've figured out how to make the called window active. Now I need to get its window handle so I can send the keyboard commands to that window. As written, the commands don't go to "cprog.exe"

 

Untitled.png

0 Kudos
Message 4 of 4
(5,582 Views)