AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Reliable window identification

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
alexei



Joined: 24 Feb 2008
Posts: 1

PostPosted: Sun Feb 24, 2008 2:37 pm    Post subject: Reliable window identification Reply with quote

As I understand, there is no way to assure that keystrokes/clicks go to the particular window. I can't rely on a very week assumption that it's the window I just activated. There are two simple ways to fix this problem
1. Implement support of "current window", i.e. set internal variable that would hold handle of the window, which supposed to be current and send messages to this window.
2. Add window handle parameter to all commands

Regarding choosing the window to work with. Title/text is definitely not enough to be really sure. I would like to check parents/children/owners, class and other properties. That would allow me to work with controls not identifiable by other methods.

I want my scripts to be very stable (production environment) and work regrdless of other activity, including interference from remote users. So far I have three choises: AutoIT, AutoHotkey, and my own programming.
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 6349
Location: Pacific Northwest, US

PostPosted: Sun Feb 24, 2008 11:05 pm    Post subject: Reply with quote

current window: maybe you mean the functionality of "Last Found Window"?

if you want to send a key to a window direct, use ControlSend instead of Send. It has full window selection parameters, and supports the last found window.
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
Guest






PostPosted: Tue Mar 04, 2008 6:08 am    Post subject: Reply with quote

Thanks, I got it Smile
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group