功能:
使用分号引导键,完成编辑等常用功能(本人键盘没有f键区)
用capslock + j、k代替方向键 上、下
win+e 启动tc,并自动点击数字(9.0 未注册版本)
将tc标题栏设置为一个简单时钟
资源管理器中,win+e打开tc并跳转到当前目录
脚本:
#NoTrayIcon #SingleInstance force ;DetectHiddenWindows, on SetControlDelay, -1 TCPach := "D:\Software\totalcmd\TOTALCMD.EXE" Gui, +LastFound +ToolWindow +AlwaysOnTop +HwndTc_Menu_Below -Caption Gui, Margin, 0, 0 Gui, Color, FFFFFF Gui, Add, Button, xm ym w60 h30 gView Default, &View Gui, Add, Button, xp y+ w60 h30 gEdit, &Edit Gui, Add, Button, xp y+ w60 h30 gRename, &Rename Gui, Add, Button, xp y+ w60 h30 gCopy, &Copy Gui, Add, Button, xp y+ w60 h30 gMove, &Move Gui, Add, Button, xp y+ w60 h30 gDelete, &Delete WinSet, TransColor, FFFFFF 220 SetTimer, TTOTAL_CMD_SETTITLE, 50 Return #e:: if WinExist("ahk_class TTOTAL_CMD") { if not WinActive("ahk_class TTOTAL_CMD") { if WinActive("ahk_class CabinetWClass") { ControlGetText, Explorer_PATH, ToolbarWindow323, A Explorer_PATH := RegExReplace(Explorer_PATH, ".*?\s(.*)","""$1""") run, %TCPach% /L=%Explorer_PATH% } WinActivate, AHK_CLASS TTOTAL_CMD } Else WinMinimize, AHK_CLASS TTOTAL_CMD } Else { if WinActive("ahk_class CabinetWClass") { ControlGetText, Explorer_PATH, ToolbarWindow323, A Explorer_PATH := RegExReplace(Explorer_PATH, ".*?\s(.*)","""$1""") run, %TCPach% /L=%Explorer_PATH% } else run, %TCPach% SetTimer, TTOTAL_CMD_SETTITLE, 50 WinWait, Ahk_class TTOTAL_CMD loop 3 { WinActivate, AHK_CLASS TTOTAL_CMD } } Return #if WinActive("ahk_class TQUICKSEARCH") || WinActive("ahk_class TTOTAL_CMD") `;:: WinGetPos, tcx, tcy, tcw, tch, Ahk_class TTOTAL_CMD Tc_Menu_Below_y := tcy + tch/3 Tc_Menu_Below_x := tcx + tcw / 2 - 30 Gui, Show, y%Tc_Menu_Below_y% x%Tc_Menu_Below_x% SetTimer, GuiEscape, -3000 Return CapsLock & j:: send, {Down} CapsLock & k:: send, {Up} #if WinActive("Ahk_class TTOTAL_CMD") :::SendPos(4003) #if WinActive("ahk_id Tc_Menu_Below") c::!c m::!m d::!d v::!v r::!r e::!e View: SendPos(903) Gui, Hide Return Edit: SendPos(904) Gui, Hide Return Rename: SendPos(1002) Gui, Hide Return Copy: SendPos(905) Gui, Hide Return Move: SendPos(906) Gui, Hide Return Delete: SendPos(908) Gui, Hide Return TTOTAL_CMD_SETTITLE: FormatTime, NowTime, , yyyy/M/d dddd HH:mm:ss WinSetTitle, AHK_CLASS TTOTAL_CMD,, % "Total Commander " . NowTime Return RemoveToolTip: SetTimer, RemoveToolTip, Off ToolTip return GuiEscape: Gui, Hide Return SendPos(Number) { PostMessage 1075, %Number%, 0, , AHK_CLASS TTOTAL_CMD }
谢谢了,下载试下
老大我试了,怎么在WIN7下面只打开TC不能打开目录,在WIN10下面就可以,是怎么回事呢?
第37行,可能win7的资源管理器类名不一样, 我用的win10,没有测试过win7