Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Bring window to front - appactivate does not help :(

$
0
0

Hello

I am coding with vbscript.

I have a need to make certain that sendkeys commands are sent to the proper program.

I can use this to activate a window:

success = WshShell.appactivate("MyProgram")
if success then WshShell.sendkeys "(% ) N"

But in Windows XP and 7 the window does not come to front. The program is activated, BUT left blinking on the taskbar below. And the key N is sent to any program that is currently open on top, for example windows explorer, which now minimizes.

How can i make sure that the command "(%) N" is sent to MyProgram? I have not been able to find a solution for this dilemma.

 

 



Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>