or this:
EverythingPath = ;specify the path here
#IfWinActive ahk_class CabinetWClass
{
F6::
folder := GetFolder()
run, %EverythingPath% -path "%folder%"
return
}
GetFolder()
{
WinGetClass,var,A
If var in CabinetWClass,ExplorerWClass,Progman
{
IfEqual,var,Progman
v := A_Desktop
else
{
winGetText,Fullpath,A
loop,parse,Fullpath,`r`n
{
IfInString,A_LoopField,:\
{
StringGetPos,pos,A_Loopfield,:\,L
Stringtrimleft,v,A_loopfield,(pos - 1)
break
}
}
}
return, v
}
}