AutoHotkey 设置在当前文件夹打开TotalCommander
CapsLock & .:: ; total commander
folder := GetActiveExplorerPath()
script := """D:\ProgramFiles\totalcmd\totalcmd.exe"" /R=""" . folder . """"
Run, % script, % folder , Max , ; without folder
Return
GetActiveExplorerPath()
{
explorerHwnd := WinActive("A")
if (explorerHwnd)
{
for window in ComObjCreate("Shell.Application").Windows
{
if (window.hwnd==explorerHwnd)
{
folder := window.Document.Folder.Self.Path
return folder
}
}
}
}
本博文本意在于记录个人的思考与经验,部分博文采用英语写作,可能影响可读性,请见谅
本文来自博客园,作者:ZXYFrank,转载请注明原文链接:https://www.cnblogs.com/zxyfrank/p/15385910.html