Jump to content


Photo

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


  • Please log in to reply
21 replies to this topic

#1 jethrow

jethrow
  • Fellows
  • 2549 posts

Posted 04 March 2012 - 08:38 PM

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:
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.



#2 Learning one

Learning one
  • Members
  • 1295 posts

Posted 05 March 2012 - 12:35 AM

Thank you!

#3 G. Sperotto

G. Sperotto
  • Members
  • 475 posts

Posted 05 March 2012 - 03:45 AM

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.

#4 sinkfaze

sinkfaze
  • Moderators
  • 6089 posts

Posted 05 March 2012 - 04:28 AM

The script requires Anchor.

#5 sinkfaze

sinkfaze
  • Moderators
  • 6089 posts

Posted 05 March 2012 - 04:33 PM

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 
	} 
}


#6 sinkfaze

sinkfaze
  • Moderators
  • 6089 posts

Posted 05 March 2012 - 05:05 PM

EDIT: Suggestion removed, hotkey ^\ works as live tracking.

#7 !hugov

!hugov
  • Guests

Posted 05 March 2012 - 05:26 PM

@jethrow: this is excellent, thank you!

#8 Alpha Bravo

Alpha Bravo
  • Members
  • 875 posts

Posted 05 March 2012 - 06:19 PM

Awesome, thank you.

#9 Guests

  • Guests

Posted 07 March 2012 - 01:23 PM

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 ?

#10 jethrow

jethrow
  • Fellows
  • 2549 posts

Posted 13 April 2012 - 05:39 AM

[*: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


#11 tinku99

tinku99
  • Members
  • 560 posts

Posted 28 April 2012 - 04:38 PM

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.

#12 jethrow

jethrow
  • Fellows
  • 2549 posts

Posted 29 April 2012 - 05:04 AM

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.

#13 Wade Hatler

Wade Hatler
  • Members
  • 24 posts

Posted 01 August 2012 - 05:59 AM

Anyone know what happened to Acc.ahk? All the links I could find are broken. Is it obsolete?

#14 MasterFocus

MasterFocus
  • Moderators
  • 4132 posts

Posted 01 August 2012 - 06:16 AM

[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 --> :!:

#15 Uberi

Uberi
  • Fellows
  • 1050 posts

Posted 01 August 2012 - 10:13 PM

Acc.ahk attached.