AutoHotkey Community

It is currently May 26th, 2012, 2:19 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: June 10th, 2005, 12:02 pm 
Offline

Joined: June 4th, 2005, 11:56 am
Posts: 26
Location: Lokeren, Belgium
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 10th, 2005, 4:19 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 10th, 2005, 5:20 pm 
Offline

Joined: June 4th, 2005, 11:56 am
Posts: 26
Location: Lokeren, Belgium
Chris,

The ControlFocus suggestion works!

Thanks a lot!

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

Guido.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: G. Sperotto, Google Feedfetcher, LazyMan, poserpro, Tilter_of_Windmills and 13 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group