Last active
August 29, 2015 14:12
-
-
Save tmplinshi/a3bf7066f6cb1f679bf8 to your computer and use it in GitHub Desktop.
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
#c::cmdHere() | |
cmdHere() { | |
If WinActive("ahk_class CabinetWClass") || WinActive("ahk_class ExploreWClass") | |
WinGetText, data | |
Run, cmd, % RegExMatch(data, "i`am)^地址: \K.*", dir) ? dir : A_Desktop | |
} | |
/* | |
cmdHere() { | |
If WinActive("ahk_class CabinetWClass") || WinActive("ahk_class ExploreWClass") { | |
WinHWND := WinActive() | |
For win in ComObjCreate("Shell.Application").Windows | |
If (win.HWND = WinHWND) { | |
dir := SubStr(win.LocationURL, 9) ; remove "file:///" | |
dir := RegExReplace(dir, "%20", " ") | |
Break | |
} | |
} | |
Run, cmd, % dir ? dir : A_Desktop | |
} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment