Jump to content

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


sumit
 Share

Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...