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 

problem with hotkey in xplorer2

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
guivho



Joined: 04 Jun 2005
Posts: 26
Location: Lokeren, Belgium

PostPosted: Fri Jun 10, 2005 12:02 pm    Post subject: problem with hotkey in xplorer2 Reply with quote

I am having problems to define a hotkey for the xplorer2. Following little script demonstrates the problem:
Code:

#3::
  WinGet, f_window_id, ID, A
  WinGetClass, f_class, ahk_id %f_window_id%
  ControlGetPos, f_Edit1Pos,,,, Edit1, ahk_id %f_window_id%
  msgbox, f_window_id=%f_window_id%`nf_class=%f_class%`nf_Edit1Pos=%f_Edit1Pos%`npath=%path%
  ControlSetText, Edit1, c:\windows, ahk_id %f_window_id%
  ControlSend, Edit1, {Enter}, ahk_id %f_window_id%
  return

The msgbox shows that all values have been set properly.
The Edit1 box becomes 'c:\windows' as expected.
But the {Enter} is never sent to the Edit1 box, but rather to the active ListPane, either BrowserListView1 or BrowserListView2.

Do I have to do something special?

The xplorer2 is a unicode version: could this explain this behaviour?
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Fri Jun 10, 2005 4:19 pm    Post subject: Reply with quote

In this case, doing a ControlFocus on Edit1 prior to the ControlSend might work. If it doesn't, you could trying using Rajat's SendMessage Tutorial to find out what message the window generates when you press Enter manually.
Back to top
View user's profile Send private message Send e-mail
guivho



Joined: 04 Jun 2005
Posts: 26
Location: Lokeren, Belgium

PostPosted: Fri Jun 10, 2005 5:20 pm    Post subject: Reply with quote

Chris,

The ControlFocus suggestion works!

Thanks a lot!

It is a constant surprise/pleasure to witness this fast support/turnaround time!

Guido.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help 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