Jump to content

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

Acc Library [AHK_L] (updated 09/27/2012)


  • Please log in to reply
49 replies to this topic
tmplinshi
  • Members
  • 245 posts
  • Last active: Mar 12 2015 02:29 PM
  • Joined: 06 Apr 2012

Thanks for this useful function.

 

It seems the max length of Acc.accValue(hWnd) is 8192 bytes. Is there any way to store more than 8192 bytes? Thanks.



azure
  • Members
  • 1216 posts
  • Last active: Mar 18 2015 09:06 AM
  • Joined: 07 Jun 2007

which are the advantages of this library?

 

does it overcome the forever-existing problem of AHK to identify controls like tray icons, firefox buttons, etc?



Guest10
  • Members
  • 1216 posts
  • Last active: Oct 30 2015 05:12 PM
  • Joined: 27 Oct 2012

is this backward compatible?



ecksphore
  • Members
  • 252 posts
  • Last active: Jul 20 2015 03:25 AM
  • Joined: 21 Nov 2006

What can be done to get this to work in google chrome?

 

It will not find the width and height of any objects under the mouse pointer.

 

F1::
Acc_Caret := Acc_ObjectFromPoint()
Caret_Location := Acc_Location(Acc_Caret)
for k,v in Caret_Location
   output .= k " =`t" v "`n"

ToolTip % output "`nA_CaretX = " A_CaretX+x "`nA_CaretY = " A_CaretY+y
output := ""

It works fine in IE and Firefox.



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

What do you mean by "get this to work" ? Chrome doesn't implement the IAccessible interface within the webpage document, from my understanding.



ecksphore
  • Members
  • 252 posts
  • Last active: Jul 20 2015 03:25 AM
  • Joined: 21 Nov 2006

Sorry, I modified my question a little too late.

 

Thank you though, that explains why I was getting 0 results.



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

I'm guessing this library will inevitably be frustrating since it has been superceded by the UI Automation framework.

 

I've been studying the UI Automation Interface this weekend. Seems superior in every way (other than non IDispatch angry.png ), except I'm not seeing anything equivalent to the accDefaultAction property (directly anyways). Anyone know of anything for DefaultAction/DoDefaultAction directly in the UI Automation Interface - without utilizing Legacy IAccessible? For instance, selecting a webbrowser tab in IE. I suppose you could utilize SetFocus + space/enter, but I'd think there would be a way to do this directly with the UI Automation Interface.



nepter
  • Members
  • 53 posts
  • Last active: Jul 31 2016 06:47 AM
  • Joined: 29 Jun 2012

Anyone know of anything for DefaultAction/DoDefaultAction directly in the UI Automation Interface - without utilizing Legacy IAccessible?

IUIAutomationLegacyIAccessiblePattern::DoDefaultAction



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

IUIAutomationLegacyIAccessiblePattern::DoDefaultAction

 
Thanks nepter. I was wondering if there was a corresponding method in UI Automation without utilizing LegacyIAccessible. The reason I ask is because:

 

legacy

... of or pertaining to old or outdated computer hardware, software, or data that, while still functional, does not work well with up-to-date systems.

 

Is [Legacy]IAccessible going to become completely diminished? If so, might we completely lose DefaultAction functionality in the future - particularly with new software?



nepter
  • Members
  • 53 posts
  • Last active: Jul 31 2016 06:47 AM
  • Joined: 29 Jun 2012

Is [Legacy]IAccessible going to become completely diminished? If so, might we completely lose DefaultAction functionality in the future - particularly with new software?

A function will be totally diminished only when it has security problem. So I think the function will be replaced by new function in future. However, this version of UIA has not provided or I have not found.



edison
  • Members
  • 29 posts
  • Last active: May 10 2015 11:15 PM
  • Joined: 13 Feb 2013

Hey jethrow,

 

I've added a few bits to the Acc Library today. Do you have a repository where a patch can be submitted?

 

One of the things I got working was accSelect() functionality, but it's extremely slow. Any idea why that may be?

 

Here's how I've implemented it:

Acc["accSelect"](0x03, ChildId + 0)

The 0x03 is bitwise ANDed SELFLAGs TAKEFOCUS and TAKESELECTION.

 

It almost appears like Acc is walking the focus through the window's objects. I was hoping that accSelect() would be faster than the {TAB 9} that I'm doing now, but it certainly doesn't appear to be.



jethrow
  • Moderators
  • 2854 posts
  • Last active: May 17 2017 01:57 AM
  • Joined: 24 May 2009
accSelect was already working. Do you have an example of where it's slow.

Also, hopefully the Acc Library will be diminished soon.

edison
  • Members
  • 29 posts
  • Last active: May 10 2015 11:15 PM
  • Joined: 13 Feb 2013

In which version was accSelect working? I only saw accSelection in Acc_Get().

 

I'm using it with a POS app which could be the culprit. As I mentioned before, tabbing between fields is significantly faster than accSelect which I would expect to be nearly instantaneous.

 

And how will the Acc Lib be diminished? Something better coming?



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

In which version was accSelect working? I only saw accSelection in Acc_Get().

 First, accSelect & accSelection are not the same thing. Neither of these two is in Acc_Get(), which is just a function designed to make walking down the IAccessible Tree Structure easier.
 

... accSelect which I would expect to be nearly instantaneous.

 accSelect itself should be nearly instantaneous. Accessing the object that is calling it may take time - particularly if you have to walk down several layers from the window object.
 

And how will the Acc Lib be diminished? Something better coming?

Check up a few posts.



Jayman405
  • Members
  • 5 posts
  • Last active: Oct 31 2014 07:57 PM
  • Joined: 09 Feb 2013
f1:: MsgBox % GetTextUnderMouse()

GetTextUnderMouse() {
	Acc := Acc_ObjectFromPoint(child)
	try value := Acc.accValue(child)
	if Not value
		try value := Acc.accName(child)
	return value
}

This suddenly stopped working for me.  It does not work within Internet Explorer, but does work elsewhere (on files on desktop).  My computer is a terminal on a network.  Could the IT guys possibly made a setting change that prohibits this from working now?