in the Recent Items menu (Windows 7).
The question is if the focusing can be done directly via Acc.
The other question is, I am using MouseMove to hover over the menu item,
is it possible, to send a message that would mimic hovering over an item,
without actually moving the cursor there.
Cheers.
Code: Select all
#IfWinActive, Start menu ahk_class DV2ControlHost
Home:: ;start menu (recent items menu) - focus menu item
End:: ;start menu (recent items menu) - focus menu item
if !(hWnd := WinExist("ahk_class BaseBar"))
Return
ControlGet, hCtl, Hwnd, , ToolbarWindow321, ahk_id %hWnd%
oAcc := Acc_ObjectFromWindow(hCtl)
if A_ThisHotkey contains Home
oAcc := Acc_Child(oAcc, 1)
if A_ThisHotkey contains End
oAcc := Acc_Child(oAcc, oAcc.accChildCount)
oRect := Acc_Location(oAcc, A_Index)
vPosX := Round(oRect.x + oRect.w-15)
vPosY := Round(oRect.y + oRect.h/2)
MouseMove, %vPosX%, %vPosY%
Return
#IfWinActive
https://autohotkey.com/boards/viewtopic.php?f=6&t=26201