AutoHotkey Community

It is currently May 27th, 2012, 11:32 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: October 6th, 2009, 8:18 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
I forgot a moment that I updated COM.ahk to incorporate Accessibility. Here is COM.ahk only version.
Code:
;ControlGet, hWnd, hWnd,, ...
MouseGetPos,,,, hWnd, 3

COM_AccInit()
If   pacc :=   COM_AccessibleObjectFromWindow(hWnd)
{
   sResult   :="[Window]`n"
      . "Name:`t`t"      COM_Invoke(pacc,"accName",0) "`n"
      . "Value:`t`t"      COM_Invoke(pacc,"accValue",0) "`n"
      . "Description:`t"   COM_Invoke(pacc,"accDescription",0) "`n"
   Loop, %   COM_AccessibleChildren(pacc, COM_Invoke(pacc,"accChildCount"), varChildren)
   If   NumGet(varChildren,16*(A_Index-1),"Ushort")=3 && idChild:=NumGet(varChildren,16*A_Index-8)
   sResult   .="[" A_Index "]`n"
      . "Name:`t`t"      COM_Invoke(pacc,"accName",idChild) "`n"
      . "Value:`t`t"      COM_Invoke(pacc,"accValue",idChild) "`n"
      . "Description:`t"   COM_Invoke(pacc,"accDescription",idChild) "`n"
   Else If   paccChild:=NumGet(varChildren,16*A_Index-8)
   sResult   .="[" A_Index "]`n"
      . "Name:`t`t"      COM_Invoke(paccChild,"accName",0) "`n"
      . "Value:`t`t"      COM_Invoke(paccChild,"accValue",0) "`n"
      . "Description:`t"   COM_Invoke(paccChild,"accDescription",0) "`n"
      , COM_Release(paccChild)
   COM_Release(pacc)
}
COM_AccTerm()

MsgBox, % sResult

If this also works, you may try a similar method with ControlGet, List, using SendMessage ReadProcessMemory etc, to see if it work too with the WindowsForms10.LISTBOX.*** control. If so, AHK's ControlGet may be updated to include this managed control too.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google Feedfetcher, Yahoo [Bot] and 19 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