Jump to content
Sign in to follow this  
sumit

how to make sure that during entire program execution a particular window is in focus

Recommended Posts

sumit

I have written a program which has several Send statements to telnet window.... is there a way to make sure that only hyperterminal window remains in focus while the long program is completed. Or is there a way to make sure that Send statements goes only to telnet window even if someone disturbs the pc.

Any suggestion would be appreciated

Share this post


Link to post
Share on other sites
ssubirias3

Try using controlsend. That way if the window loses focus, it still works.

Also important to note that some Control commands like ControlClick, ControlCommand, and ControlSetText are known to need focus. This from the Help file:

Some controls will resist automation unless they are the active window. Use the WinActive() function to force the control's window to the top before using ....

Comment intened for folks not aware of this point, not necessarily Volly :)

Edit: Volly I clicked the Uten's tutorial on using arrays - A Must Read! in your signature and OMG where was this like 2 weeks ago when I was trying to figure out arrays! Thankfully PsaltyDS and Paulie have worked with explained this so that I now think I have it the basics down. What I really what to know is why the Wiki - Main Page isn't a sticky topic on this forum? It's got some great stuff!! Thanks again for putting this in you signature!

Edited by ssubirias3

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.