Created
January 20, 2020 22:14
-
-
Save GENiEBEN/e0f82c4d5156f4982f1c3a4a7c5a4281 to your computer and use it in GitHub Desktop.
Tray script that monitors every folder selected or entered in Explorer.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Previous= | |
Current= | |
Loop | |
{ | |
Current :=GetExplorerSel() | |
If (Previous <> Current) | |
{ | |
TrayTip, You have selected, %Current%, 10, 1 | |
Previous = %Current% | |
} | |
Sleep, 100 | |
} | |
GetExplorerSel(hwnd="") { | |
hwnd := hwnd ? hwnd : WinExist("A") | |
WinGetClass class, ahk_id %hwnd% | |
If (class="CabinetWClass" or class="ExploreWClass") | |
For w in ComObjCreate("Shell.Application").Windows | |
If (w.hwnd==hwnd) | |
{ | |
sel := w.Document.SelectedItems | |
For i In sel | |
ret .= i.path "`n" | |
return Trim(ret,"`n") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment