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
Acc Library links should be available now.

I made a couple updates to the viewer which should make it more usable. I plan on doing a slight rewrite which will change the GUI somewhat. If anyone has any suggestions, please post them.

rbrtryn
  • Members
  • 1177 posts
  • Last active: Sep 11 2013 08:04 PM
  • Joined: 22 Jun 2011
Looks like could provide new accessibility for browsers like FireFox and Chrome, but I haven't a clue how to use the info it provides. :?

Could you, for instance, find a link in a firefox web page with the name "Board Index" and then somehow open the associated URL?

Some type of help file would be appreciated.

My Scripts are written for the latest released version of AutoHotkey.

Need a secure, accessible place to backup your stuff? Use Dropbox!


jethrow
  • Moderators
  • 2854 posts
  • Last active: May 17 2017 01:57 AM
  • Joined: 24 May 2009
The information you can access is provided in the Gui, under the Accessible Info section. To access the Name, you would use:
Acc_Get("Name", ...

Additionally, this is still in Alpha state. There will be more documentation & examples later.

rbrtryn
  • Members
  • 1177 posts
  • Last active: Sep 11 2013 08:04 PM
  • Joined: 22 Jun 2011
I am experimenting with this:
SetTitleMatchMode 2
	InputBox Path, ACC Path
	WinActivate Mozilla Firefox
	Name := Acc_Get("Name", Path, 0, "A")
	Location := Acc_Get("Location", Path, 0, "A")
	Value := Acc_Get("Value", Path, 0, "A")
	MsgBox % Name "`n" Value "`n" Location.x "     " Location.y
return

I can get the name and value of the link, but the location comes up blank. What did I do wrong?

My Scripts are written for the latest released version of AutoHotkey.

Need a secure, accessible place to backup your stuff? Use Dropbox!


jethrow
  • Moderators
  • 2854 posts
  • Last active: May 17 2017 01:57 AM
  • Joined: 24 May 2009
It should work fine now, though the location will return a string rather than an object.

jablonsky
  • Members
  • 11 posts
  • Last active: Dec 11 2017 03:27 PM
  • Joined: 24 Nov 2012
This seems like a magical utility. Unfortunately running the source code on Windows 7 (64Bit) under AHK_L 1.1.08.1 (32bit) reports Acc_Children Failed at line 464. The executable reports the same at line 696. Thoughts?

iDrug
  • Members
  • 389 posts
  • Last active: Oct 11 2015 09:24 PM
  • Joined: 13 Oct 2009

---------------------------
AccViewer - smth for firefox.ahk
---------------------------
Error at line 110 in #include file "C:\Program Files\AutoHotkey\Lib\Acc.ahk".

Line Text: Acc_Error(p="")
Error: Duplicate function definition.

The program will exit.
---------------------------
ОК  
---------------------------




Sergio
  • Members
  • 516 posts
  • Last active: Dec 01 2017 04:46 PM
  • Joined: 16 Mar 2008

I hope the question isn't too newbish, but...  Using the compiled software I found the field that I want to search for under: Window >>  Application >> grouping >> tool bar >> text.

 

I've downloaded the library and I'm wondering which command to input to get the status of the same field.  Can anyone help?

 

Edit: FYI, this is to read FireFox's Add-on Status-4-Evar to see if the page is finished loading.  (https://addons.mozil.../Status-4-Evar/)

 

75124326.png


Edited by Sergio, 05 June 2013 - 05:28 PM.

ahkFooter.png

IF YOU DO NOT GET ANSWERS HERE, TRY; HTTP://AHKSCRIPT.ORG/BOARDS


zenrook
  • Members
  • 8 posts
  • Last active: Jan 29 2014 09:04 PM
  • Joined: 13 Nov 2009

I'm with @Sergo, I'm not sure I understand what I'm doing once I've gotten the information from the Accessible Info Viewer.

 

For example in Serio's screen shot, it shows path: 4,20,1,7,1
 
If I want the location of the bar, I used rbrtyn's example, and incorporated jethrow's comment that the location would be returned as a string.

#include acc.ahk
WinActivate Firefox
Path := 4,20,1,7,1
Name := Acc_Get("Name", Path, 0, "A")
Location := Acc_Get("Location", Path, 0, "A")
Value := Acc_Get("Value", Path, 0, "A")
MsgBox % Name "`n" Value "`n" Location

When I run this for some reason when I run this script I only get values as if my path stopped at 4 and did not continue processing the 20,1,7,1

 

Is there someplace I can read more about how to use the Acc comands and using the path information successfully?



sinkfaze
  • Moderators
  • 6367 posts
  • Last active: Nov 30 2018 08:50 PM
  • Joined: 18 Mar 2008
Path := "4,20,1,7,1"
?

Joe Glines
  • Members
  • 118 posts
  • Last active: Jan 24 2016 03:08 PM
  • Joined: 23 Dec 2009

I tried the tool the other day and noticed it exported a comma delimited list (not dot delimited).  Once I swapped out dots for the commas it did pull in the fields I was looking for


Automating the mundane 1 script at a time...
https://www.linkedin.com/in/joeglines
The-Automator

robertcollier4
  • Members
  • 141 posts
  • Last active: Jun 28 2019 01:05 AM
  • Joined: 11 Nov 2012

Wow, fantastic tool. Through this I am sure many more people will be able to become aware of what is possible through Acc.

 

Suggestions, mainly relating to ease of being able to view information:

1. The Class(NN) inputbox is too small. It is usually the most important thing to see that name of the currently focused on ClassNN control - and many ClassNN controls often have the same prefix for the same application. Perhaps the Class(NN) control could be promoted to its own full-width line.

2. Perhaps window could be resizable so as to auto accomodate longer inputbox for apps with long names?



steventaitinger
  • Members
  • 17 posts
  • Last active: May 02 2018 08:12 PM
  • Joined: 05 Feb 2013

See below for my addition to this I found useful of navigating between parent and children.
 

Gui, acc_menu:New
;%acc_info%
Gui, Add, Button,  Default  w%button_width%  gget_parent, Get Parent
Gui, Add, Button, Default ys section w%button_width%  gget_client, Get Client
Gui, Add, Text, xs h1000 w%button_width% vtext, lots of `n text `n and lines `n
Gui, Add, Button, Default  ys section w%button_width%  gget_child, Get Child
Gui, Add, Edit, r1 w20 xs vchild_number , 1
Gui, Add, text, w%button_width% h1000 xs vgui_role_list , role list
 
Gui, show,  h600, ACC Menu
return
get_parent:
acc:=Acc_Parent(acc)
goto set_acc_info
return
ontop:
Gui, acc_menu: +alwaysontop
return
get_client:
;get iwebbrowser 2 wrapped handle
winactivate ahk_class IEFrame
wb:=IEGet()
;get client
loop {
;get hwnd
ControlGet, hwnd, hwnd, , DirectUIHWND%A_Index%, % "ahk_id" wb.hwnd
;this ends the loop after it gets to acc objects that don't have a hwnd or something
if ErrorLevel
 break
;gets a usable object related to the window from an idispatch pointer
client := Acc_ObjectFromWindow(hwnd, -4)
} until Acc_Role(page_tab_list) = "page tab list"
acc:=client
goto set_acc_info
return
get_child:
GuiControlGet, child_number , , child_number
acc:=Acc_Children(acc)[child_number]
goto set_acc_info
return
set_acc_info:
Gui, Submit,NoHide
;write all properties
acc_info:=""
acc_info.="accChild -`t" Acc_Child(acc) "`n"
acc_info.="accChildCount -`t" acc.accChildCount "`n"
;acc_info.="accDefaultAction -`t" acc.accDefaultAction "`n"
;acc_info.="accDescription -`t" acc.accDescription "`n"
acc_info.="accFocus -`t" acc.accFocus "`n"
;acc_info.="accHelp -`t" acc.accHelp "`n"
;acc_info.="accHelpTopic -`t" acc.accHelpTopic "`n"
;acc_info.="accKeyboardShortcut -`t" acc.accKeyboardShortcut "`n"
acc_info.="accName -`t" acc.accName(0) "`n"
acc_info.="accParent -`t" Acc_Parent(acc) "`n"
acc_info.="accRole -`t" Acc_Role(acc) "`n"
acc_info.="accSelection -`t" acc.accSelection "`n"
acc_info.="accState -`t" Acc_State(acc) "`n"
;acc_info.="accValue -`t" acc.accValue "`n"
GuiControl, , text, %acc_info%
goto update_children_roles
return
update_children_roles:
role_list:="role list`n"
loop % acc.accChildCount {
role_list.=a_index " " Acc_Role(Acc_Children(acc)[a_index]) " `n"
}
GuiControl, , gui_role_list, %role_list%
return
 


ballplayermark
  • Members
  • 2 posts
  • Last active: Jul 17 2015 01:31 AM
  • Joined: 24 Aug 2013

I'm with @Sergo, I'm not sure I understand what I'm doing once I've gotten the information from the Accessible Info Viewer.

 

For example in Serio's screen shot, it shows path: 4,20,1,7,1
 
If I want the location of the bar, I used rbrtyn's example, and incorporated jethrow's comment that the location would be returned as a string.

#include acc.ahk
WinActivate Firefox
Path := 4,20,1,7,1
Name := Acc_Get("Name", Path, 0, "A")
Location := Acc_Get("Location", Path, 0, "A")
Value := Acc_Get("Value", Path, 0, "A")
MsgBox % Name "`n" Value "`n" Location

When I run this for some reason when I run this script I only get values as if my path stopped at 4 and did not continue processing the 20,1,7,1

 

Is there someplace I can read more about how to use the Acc comands and using the path information successfully?

I too am unable to get access to the full path.

I am trying to get to a button in an application, then want to issue a click event (there is not a hotkey for the button).

To test this out, I am trying to click the "Play" botton on windows media player.  The Accessible Info Viewer shos the path as 4,2,4,1,19,1,13,3

Any help in accomplising this would be greatly appreciated.



col_mik
  • Members
  • 171 posts
  • Last active: Aug 29 2015 03:29 PM
  • Joined: 28 Jun 2015

I would really like to get this script, but when I click the download links at the head of the post for either the source or compiled versions, I get

Error (509)

This account's public links are generating too much traffic and have been temporarily disabled!

 

Can you say when this temporary situation will be lifted?