AutoHotkey Community

It is currently May 27th, 2012, 1:06 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: April 3rd, 2008, 11:08 am 
Hi, i don't know if this problem is known.

The code is:
Code:
...
Gui, Show, AutoSize Hide, Command:
DetectHiddenWindows, On
ControlGet, cId, Hwnd,, Edit1, Command:
DetectHiddenWindows, Off
...


This should work because the help says "To operate upon a control's HWND (window handle), leave the Control parameter blank and specify ahk_id %ControlHwnd% for the WinTitle parameter (this also works on hidden controls even when DetectHiddenWindows is Off)"
Code:
...
ControlSend,  , ^a, ahk_id %cId%
WinShow, Command:
...


I tried also
Code:
...
DetectHiddenWindows, On
ControlSend,  Edit1, ^a, Command:
DetectHiddenWindows, Off
WinShow, Command:
...


But with no success. What i need to do is to select text before the windows is showed. In Vista, this works, but not in XP.

It's a bug?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2008, 1:37 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Sorry for the late reply.

The following test script seems to work, at least on XP:
Code:
Run Notepad
WinWait ahk_class Notepad
WinActivate
ControlGet, cId, Hwnd,, Edit1
WinHide
Sleep 500
ControlSend,, abc, ahk_id %cId%
Sleep 500
WinShow
Therefore, perhaps there's an incompatibility with the particular application window you're targeting, or something amiss in your script.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Amandaville, BrandonHotkey, chaosad and 22 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