Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Accessible Info Viewer - Alpha Release (2012-09-20)


  • Please log in to reply
36 replies to this topic
jethrow
  • Moderators
  • 2854 posts
  • Last active: May 17 2017 01:57 AM
  • Joined: 24 May 2009
Microsoft Active Accessibility (MSAA) is an Application Programming Interface (API) for user interface accessibility ... The programmatic goal of MSAA is to allow Windows controls to expose basic information, such as name, location on screen, or type of control, and state information such as visibility, enabled, or selected. - Wikipedia


AccessibleViewerInfo_zps8aab1c4c.png

Download Links:

EXECUTABLE

SOURCE CODE

 
Accessible Info Viewer is designed to be used with the Acc Library. The Child Path, which can be copied by clicking on the middle section of the status bar on the viewer, is designed to be used with the Acc_Get function, which will be added to the Acc Library in the near future. Here is an example of getting the URL from Firefox, as shown in the image above:https://gist.github.com/2374052
Additional Notes:
- In the Acc Viewer window, Accesible Objects are bold, and child elements are normal font.
^/ is a Hotkey that operates like dragging the cross-hair, but allows you to still click.

CHANGELOG:
2012-09-20
Builds Child Path from Window object, rather than Client object
Child Path is now dot-delimited, rather than csv


2012-04-13
StatusBar Changes:
- Show More/Less button is now text
- Change Curser to hand
- Added "Path" & Removed the "Copy Child Path" button
Store each objects child_path in it's TVobj slot
Turned Off "~Lbutton Up" Hotkey at beginning of script
Path doesn't go back up to the Parent Window if you first reach the ObjectFromWindow object in GetAccPath()


*Note - thread history can be found here.

Learning one
  • Members
  • 1483 posts
  • Last active: Jan 02 2016 02:30 PM
  • Joined: 04 Apr 2009
Thank you!

G. Sperotto
  • Members
  • 539 posts
  • Last active: Jun 20 2015 04:54 PM
  • Joined: 12 Dec 2011
Thanks for the tool and the library Jethrow :)

I'm getting an error on line 335 due to a call to a function named "Anchor" inside the "AccSize" label. Function Anchor is not present in the library nor in the script itself. Is this unintended :?:


Thanks.

sinkfaze
  • Moderators
  • 6367 posts
  • Last active:
  • Joined: 18 Mar 2008
The script requires Anchor.

sinkfaze
  • Moderators
  • 6367 posts
  • Last active:
  • Joined: 18 Mar 2008
Excellent work, as always.

The GUI is not resizing properly on my computer, which has resolution @ 2560x1600. The buttons are not properly expanded to accomodate the button text, and most of the text controls end up overflowing behind either the edge of the window or the edit control preceding them to their left.

Why not make Acc_getChild a variadic function? That will at least make it a little more 'natural' as function parameter syntax goes and with a little tweak in the Info Viewer the copied child path can be pasted right onto the end of the function (not that you couldn't tweak to do it with your method anyway, but I digress):

Acc_getChild(hWnd,"P,4,3,3")	; current

Acc_getChild(hWnd,"P",4,3,3)	; as variadic

And it would only change the inner workings of the function in a trivial manner:

Acc_getChild(Acc_or_Hwnd,[color=red]child_path*[/color]) {
 
	Acc :=	!WinExist("ahk_id " Acc_or_Hwnd) ? Acc_or_Hwnd : Acc_ObjectFromWindow(Acc_or_Hwnd)
	if	ComObjType(Acc,"Name") = "IAccessible" { 
		[color=red]For i, child in child_path
			Acc :=	(child="P") ? Acc_Parent(Acc) : Acc_Children(Acc)[child][/color] 
		return	Acc 
	} 
}


sinkfaze
  • Moderators
  • 6367 posts
  • Last active:
  • Joined: 18 Mar 2008
EDIT: Suggestion removed, hotkey ^\ works as live tracking.

!hugov
  • Guests
  • Last active:
  • Joined: --
@jethrow: this is excellent, thank you!

Alpha Bravo
  • Members
  • 1687 posts
  • Last active: Nov 07 2015 03:06 PM
  • Joined: 01 Sep 2011
Awesome, thank you.

  • Guests
  • Last active:
  • Joined: --
Win7, classical theme/view: the show more button is not visible, quick fix would be to change line 156 from Gui, Show, w280 h319
to
Gui, Show, w280 h335

Alternative: move the button up to the home row, you can use a Wingdings font with a small arrow down/up ?

jethrow
  • Moderators
  • 2854 posts
  • Last active: May 17 2017 01:57 AM
  • Joined: 24 May 2009

[*:3cph3lqc]StatusBar Changes:
- Show More/Less button is now text
- Change Curser to hand
- Added "Path" & Removed the "Copy Child Path" button
[*:3cph3lqc]Store each objects child_path in it's TVobj slot
[*:3cph3lqc]Turned Off "~Lbutton Up" Hotkey at beginning of script
[*:3cph3lqc]Path doesn't go back up to the Parent Window if you first reach the ObjectFromWindow object in GetAccPath()



The GUI is not resizing properly on my computer, which has resolution @ 2560x1600. The buttons are not properly expanded to accomodate the button text, and most of the text controls end up overflowing behind either the edge of the window or the edit control preceding them to their left.

Could you provide a screen shot?


Why not make Acc_getChild a variadic function? That will at least make it a little more 'natural' as function parameter syntax goes...

I haven't seen a standard for accessing a MSAA Child Objects, so I presume 'natural' is a matter of opinion. I would actually say a dotted path would be more natural - similar to how the AHK Basic Com Library worked. That might also be more readable when used in command form:
child := Acc_getChild(hWnd,"P.4.3.3")
Acc_getChild, child, hWnd, P.4.3.3


tinku99
  • Members
  • 560 posts
  • Last active: Feb 08 2015 12:54 AM
  • Joined: 03 Aug 2007
Hello Jethrow,
I just came across this: pyiaan MSAA library in python.
I wonder if we should be building new desktop automation functionality on top on pywin32 instead of autohotkey given the turmoil.
we can always expose it to ahk with pythoncom or zeromq.
By the way, Do you ever plan on using a dcvs like git ?
I see you are using gists already, but why not repos ?
Would make it easier to contribute to your projects.

jethrow
  • Moderators
  • 2854 posts
  • Last active: May 17 2017 01:57 AM
  • Joined: 24 May 2009

I wonder if we should be building new desktop automation functionality on top on pywin32 instead of autohotkey ...

I currently don't have any interest in coding outside of AutoHotkey(_L) - though I might be able to be persuaded.

By the way, Do you ever plan on using a dcvs like git ?

Considering I didn't know what dcvs was until just now ... not really, haven't done a project that had enough attention to merit using one. I could be persuaded, however, if someone pestered me enough.

I see you are using gists already

That's just for syntax highlighting - I don't have an account.

Wade Hatler
  • Members
  • 40 posts
  • Last active: Nov 06 2014 10:46 PM
  • Joined: 28 Sep 2004
Anyone know what happened to Acc.ahk? All the links I could find are broken. Is it obsolete?

MasterFocus
  • Moderators
  • 4323 posts
  • Last active: Jan 28 2016 01:38 AM
  • Joined: 08 Apr 2009
[1] <!-- l --><a class="postlink-local" href="http://www.autohotkey.com/community/viewtopic.php?f=5&t=89124">viewtopic.php?f=5&t=89124</a><!-- l -->
[2] <!-- l --><a class="postlink-local" href="http://www.autohotkey.com/community/viewtopic.php?f=6&t=89243">viewtopic.php?f=6&t=89243</a><!-- l -->
[3] <!-- l --><a class="postlink-local" href="http://www.autohotkey.com/community/viewtopic.php?f=1&t=89337">viewtopic.php?f=1&t=89337</a><!-- l --> :!:

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Antonio França -- git.io -- github.com -- ahk4.net -- sites.google.com -- ahkscript.org

Member of the AHK community since 08/Apr/2009. Moderator since mid-2012.


Uberi
  • Moderators
  • 1119 posts
  • Last active: May 02 2015 06:05 PM
  • Joined: 23 Aug 2010
Acc.ahk attached.