Hi, maestrith
When I launch the "Open Folder" menu item, the folder opens, but the current file does not become selected. Just in case, there is code which can do that:
SelectFilePath(filePath)
{
SplitPath, filePath,, dir
for window in ComObjCreate("Shell.Application").Windows {
ShellFolderView := window.Document
try if ((oFolder := ShellFolderView.Folder).Self.Path != dir)
continue
catch
continue
for item in oFolder.Items
if (item.Path = filePath && found := true)
break 2
}
if !found
Run, explorer /select`, "%FilePath%"
else {
WinActivate, % "ahk_id" window.hwnd
ShellFolderView.SelectItem(item, 1|4|8|16)
}
}
Hi, maestrith When I launch the "Open Folder" menu item, the folder opens, but the current file does not become selected. Just in case, there is code which can do that: