You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Explorer Lib, in order to retrieve the right tab/window in the Windows 11 Explorer, you need to check if the window title is the same as the title of the tab in addition to checking if it is the right hwnd:
Explorer_GetWindow(hwnd="")
{
WinGet, process, processName, % "ahk_id" hwnd := hwnd? hwnd:WinExist("A")
WinGetClass class, ahk_id %hwnd%
If (process!="explorer.exe")
Return
If (class ~= "(Cabinet|Explore)WClass")
{
WinGetTitle, currentWindowTitle, A
For window In ComObjCreate("Shell.Application").Windows
If (window.hwnd == hwnd And window.LocationName == currentWindowTitle)
Return window
}
Else If (class ~= "Progman|WorkerW")
Return "desktop" ; desktop found
}
The two thing I added to the code are WinGetTitle, currentWindowTitle, A and And window.LocationName == currentWindowTitle
The text was updated successfully, but these errors were encountered:
In the Explorer Lib, in order to retrieve the right tab/window in the Windows 11 Explorer, you need to check if the window title is the same as the title of the tab in addition to checking if it is the right hwnd:
The two thing I added to the code are
WinGetTitle, currentWindowTitle, A
andAnd window.LocationName == currentWindowTitle
The text was updated successfully, but these errors were encountered: