I use an AHK script in Windows Explorer (below) that navigates back one folder level when I double-click an empty space inside a folder. It would be helpful if I could do this in Opus. Would someone be able to suggest something I can modify in the AHK script (below) or maybe there's an option or opus script that can accomplish this? Thanks.
~LButton::
if ( IsDblClick() && (hWnd := WinActive("ahk_class CabinetWClass")) && IsEmptySpace() )
;USE IF YOU WANT TO NAVIGATE BACK tO PARENT - EVEN WHEN IN SHORTCUT
NavigateToParentDir()
Return
IsDblClick() {
Return A_PriorHotkey = A_ThisHotkey && A_TimeSincePriorHotkey < 400
}
IsEmptySpace() {
global ; assume global for all variables accessed or created inside this function
static ROLE_SYSTEM_LIST := 0x21
CoordMode, Mouse
MouseGetPos, X, Y
AccObj := AccObjectFromPoint(idChild, X, Y)
Return AccObj.accRole(0) = ROLE_SYSTEM_LIST
}
AccObjectFromPoint(ByRef _idChild_ = "", x = "", y = "") {
static VT_DISPATCH := 9, F_OWNVALUE := 1, h := DllCall("LoadLibrary", "Str", "oleacc", "Ptr")
(x = "" || y = "") ? DllCall("GetCursorPos", "Int64P", pt) : pt := x & 0xFFFFFFFF | y << 32
VarSetCapacity(varChild, 8 + 2*A_PtrSize, 0)
pacc := 0
if DllCall("oleacc\AccessibleObjectFromPoint", "Int64", pt, "PtrP", pAcc, "Ptr", &varChild) = 0
Return ComObject(VT_DISPATCH, pAcc, F_OWNVALUE), _idChild_ := NumGet(varChild, 8, "UInt")
}
NavigateToParentDir() {
Send {BackSpace}
}