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
iDrug
  • Members
  • 389 posts
  • Last active: Oct 11 2015 09:24 PM
  • Joined: 13 Oct 2009
Can AccLibrary/AccViewer retrieve a hwnd of an element under the cursor?
How can I create a script (with the help of AccLibrary/AccViewer) that would get the role of the element under the cursor in Firefox? I'd like to write a script that, say, sends Ctrl+Tab if the cursor hovers tab-bar (or any of it's descendant elements) and the user hits a hotkey.

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

I suppose that depends on if the element has a hwnd - or rather, if it is a window/control. You might want to look into Acc_ObjectFromPoint.



cdjones
  • Members
  • 73 posts
  • Last active: Feb 07 2014 09:42 PM
  • Joined: 15 Sep 2009

I'm trying to find a way of using ACC to allow entry of username and password into a website using firefox. I can find the fields eg (4,34,7,1,1,1,1,1,2,1,1,1,1,2 is username)

 

How do I write to the field ?

 

and then how do I press the login button.

 

Doing this in Firefox because that's the browser I use all day.

 

Thanks for any help



jethrow
  • Moderators
  • 2854 posts
  • Last active: May 17 2017 01:57 AM
  • Joined: 24 May 2009
The better question is - is it possible. You'd be better off asking in the support section. However, keep in mind this is an advanced topic, & ACC has been superceded by UIA.

You might be better off using JavaScript, our IE.

hotkeyguy
  • Members
  • 84 posts
  • Last active: Jun 03 2016 06:44 PM
  • Joined: 18 Nov 2011

Hello again,

 

concerning invoking the 'Open...' Menu in Notepad (@sinkfaze) I don't understand the line

WinGet, b, List, ahk_class #32768

FINALLY I got it to invoke the 'Open...' Menu in Notepad:
 

if	!window :=	Acc_Parent(Acc_ObjectFromWindow(WinExist("ahk_class Notepad")))
{
	MsgBox, Epic FAIL d00d.
	return
}
For each, object in Acc_Children(window)
{}	Until	(object.accName="Application")
Sleep, 100
For each, mainMenu in Acc_Children(object)
{}	Until	(mainMenu.accName="File")
WinGet, b, List, ahk_class #32768
mainMenu.accDoDefaultAction(1), a :=	b
Sleep, 50
While	(a=b)
	WinGet, a, List, ahk_class #32768
fileMenu :=	Acc_ObjectFromWindow(a%a%)
For each, item in Acc_Children(fileMenu)
{}	Until	InStr(fileMenu.accName(item),"Open")
fileMenu.accDoDefaultAction(item)

 

I know that ahk_class #32768 is used to check whether the (right click) context menu is shown, but I don't understand its use with WinGet here.

 

 

Many thanks and greetings
hotkeyguy