Explorer: get name of file under cursor
Posted: 10 Jul 2018, 00:21
- In response to this:
[x64 & x32 fix] DeskIcons - Get/Set Desktop Icon Positions - Page 2 - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 74#p227874
- Here's a way to get the name of the file under the cursor via Acc:
- If you experiment with AccViewer, you can get information for, and see the boundaries of, different GUI windows/controls/elements under the cursor.
Acc library (MSAA) and AccViewer download links - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=26201
- Also of interest:
.net - c# how to get window explorer Directory path under mouse cursor - Stack Overflow
https://stackoverflow.com/questions/171 ... use-cursor
c# - Get the folder path under cursor? - Stack Overflow
https://stackoverflow.com/questions/786 ... der-cursor
[x64 & x32 fix] DeskIcons - Get/Set Desktop Icon Positions - Page 2 - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 74#p227874
- Here's a way to get the name of the file under the cursor via Acc:
Code: Select all
;[Acc functions]
;Acc library (MSAA) and AccViewer download links - AutoHotkey Community
;https://autohotkey.com/boards/viewtopic.php?f=6&t=26201
;tested on Windows 7
q:: ;Explorer window/Desktop - get name of file under cursor
oAcc := Acc_ObjectFromPoint(vChildID)
MouseGetPos,,, hWnd, vCtlClassNN
WinGetClass, vWinClass, % "ahk_id " hWnd
vText := ""
if (vWinClass = "CabinetWClass") || (vWinClass = "ExploreWClass")
try vText := oAcc.accValue(vChildID)
else if (vWinClass = "Progman") || (vWinClass = "WorkerW")
try vText := oAcc.accName(vChildID)
MsgBox, % vText
oAcc := ""
return
Acc library (MSAA) and AccViewer download links - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=26201
- Also of interest:
.net - c# how to get window explorer Directory path under mouse cursor - Stack Overflow
https://stackoverflow.com/questions/171 ... use-cursor
c# - Get the folder path under cursor? - Stack Overflow
https://stackoverflow.com/questions/786 ... der-cursor