https://autohotkey.com/board/topic/6072 ... ile/page-2
Code: Select all
F3::MsgBox % Explorer_GetSelection()
Explorer_GetSelection(hwnd="")
{
hwnd := hwnd ? hwnd : WinExist("A")
WinGetClass class, ahk_id %hwnd%
if (class="CabinetWClass" or class="ExploreWClass" or class="Progman")
for window in ComObjCreate("Shell.Application").Windows
if (window.hwnd==hwnd)
sel := window.Document.SelectedItems
for item in sel
ToReturn .= item.path "`n"
return Trim(ToReturn,"`n")
}
Many Thanks Advanced.
PD: any suggestion of a better code to get the Filepath is very wellcome.