智能跳转---TC资源管理器
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;作者:天甜;QQ:
;一花一世界,一叶一枯荣,心无挂碍,无挂碍故,无有恐怖,远离颠倒梦想,究竟涅盘。
;更新于:----
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Process, Priority,,high ;脚本高优先级
#NoTrayIcon ;隐藏托盘图标
#NoEnv ;不检查空变量是否为环境变量
#Persistent ;让脚本持久运行(关闭或ExitApp)
#SingleInstance Force ;跳过对话框并自动替换旧实例
#WinActivateForce ;强制激活窗口
#MaxHotkeysPerInterval ;时间内按热键最大次数
SetBatchLines - ;脚本全速执行
SetControlDelay ;控件修改命令自动延时
CoordMode Menu Window ;坐标相对活动窗口
SendMode Input ;更速度和可靠方式发送键盘点击
SetTitleMatchMode ;窗口标题模糊匹配
;SetTitleMatchMode,RegEx
DetectHiddenWindows On ;显示隐藏窗口
SetWorkingDir %A_ScriptDir% ;当前脚本所在目录的绝对路径.不包含最后的反斜线(根目录同样如此);A_ScriptDir指的是D:\zxh\QuickZ\Apps ;另存为|保存|复制|新建|打开|图形另存为|文件打开|保存副本|上传|选择文件 ahk_class #
GroupAdd,Window32770,另存为 ahk_class #
GroupAdd,Window32770,保存 ahk_class #
GroupAdd,Window32770,复制 ahk_class #
GroupAdd,Window32770,新建 ahk_class #
GroupAdd,Window32770,打开 ahk_class #
GroupAdd,Window32770,图形另存为 ahk_class #
GroupAdd,Window32770,文件打开 ahk_class #
GroupAdd,Window32770,打开文件 ahk_class #
GroupAdd,Window32770,保存副本 ahk_class #
GroupAdd,Window32770,上传 ahk_class #
GroupAdd,Window32770,选择文件 ahk_class #
GroupAdd,Window32770,插入图片 ahk_class #
GroupAdd,Window32770,导入 ahk_class # global this_title=
global zParam
;~ OnMessage(0x5555, "MsgMonitor") ;在某些程序中自动切换中文,某些英文 注册个窗口钩子然后监听系统消息
Gui +LastFound +hwndhwndshellwindow
DllCall( "RegisterShellHookWindow", "UInt",hwndshellwindow )
OnMessage( DllCall( "RegisterWindowMessage", "Str", "SHELLHOOK" ), "SwitchMessage" )
return
;~ MsgMonitor(wParam, lParam, msg)
;~ {
;~ zParam = %wParam%
;~ }
^+!::zParam :=
^+!::zParam := SwitchMessage( wParam,lParam ) ;{
{
If ( wParam != ) ;新开窗口
{
If WinActive("ahk_class TTOTAL_CMD")
{
WinWaitNotActive ahk_class TTOTAL_CMD
SendMessage , , , , ahk_class TTOTAL_CMD
ControlGetText, varPathInTC, , ahk_id %ErrorLevel%
StringReplace, this_title, varPathInTC, >, \
IfWinExist ahk_group Window32770
{
WinWaitActive ahk_group Window32770, ,
if !ErrorLevel
;IfWinActive ahk_group Window32770
{
ControlClick, Edit1, A
Sleep,
ControlSetText, Edit1, %this_title%, A
Sleep,
ControlSend, Edit1, {Enter}, A
}
else
return
}
else
return
return
}
If WinActive("ahk_class CabinetWClass")
{
WinWaitNotActive ahk_class CabinetWClass
WinGetTitle, this_title, ahk_class CabinetWClass ;“文件夹选项”,“查看”,“在标题栏显示完整路径”,“确定”,显示完整路径
if this_title=桌面
this_title=%A_Desktop%
;if this_title=库\文档
;this_title=%A_MyDocuments%
IfWinExist ahk_group Window32770
{
WinWaitActive ahk_group Window32770, ,
if !ErrorLevel
;IfWinActive ahk_group Window32770
{
ControlClick, Edit1, A
Sleep,
ControlSetText, Edit1, %this_title%, A
Sleep,
ControlSend, Edit1, {Enter}, A
}
else
return
}
else
return
return
}
If WinActive("ahk_class SciTEWindow")
{
if zParam =
{
OCR_IBEAM =
hbeam := DllCall("LoadCursorFromFile","Str","D:\zxh\QuickZ\User\Icons\zzx.cur")
DllCall( "SetSystemCursor", Uint,hbeam, Int,OCR_IBEAM )
}
if zParam =
{
SPI_SETCURSORS := 0x57
DllCall("SystemParametersInfo", "UInt", SPI_SETCURSORS, "UInt", , "UInt", , "UInt", )
}
WinWaitNotActive ahk_class SciTEWindow
{
SPI_SETCURSORS := 0x57
DllCall("SystemParametersInfo", "UInt", SPI_SETCURSORS, "UInt", , "UInt", , "UInt", )
}
return
}
}
} ;} >!o::
Send, ^o
WinWaitActive ahk_class #
ControlFocus, Edit1, A
send,{Backspace}
sleep
ControlSetText, Edit1, %this_title%, A
Sleep,
ControlSend, Edit1, {Enter}, A
return
>!l::
Send, ^+s
WinWaitActive ahk_class #
ControlFocus, Edit1, A
send,{Backspace}
sleep
ControlSetText, Edit1, %this_title%, A
Sleep,
ControlSend, Edit1, {Enter}, A
return
>!n::
Send, ^n
WinWaitActive ahk_class #
ControlFocus, Edit1, A
send,{Backspace}
sleep
ControlSetText, Edit1, %this_title%, A
Sleep,
ControlSend, Edit1, {Enter}, A
return
;~ ^+s::
;~ Send ^+s
;~ WinWaitActive ahk_class #
;~ ControlFocus, Edit1, A
;~ send,{Backspace}
;~ sleep
;~ ControlSetText, Edit1, %this_title%, A
;~ Sleep,
;~ ControlSend, Edit1, {Enter}, A
;~ return #IfWinActive, ahk_class #
^g:: ;发送最后 TC or 资管 路径到32770
ControlClick, Edit1, A
Sleep,
ControlSetText, Edit1, %this_title%, A
Sleep,
ControlSend, Edit1, {Enter}, A
return ^e:: GoSub,Sub_SendCurDiagPath2Exp ;在系统资管中打开对话框的路径
^t:: GoSub,Sub_SendCurDiagPath2Tc ;在TC中打开对话框的路径
;~ Space & t:: GoSub,Sub_SendCurDiagPath2Tc
#If ;将Explorer中路径发送到对话框
Sub_SendExpCurPath2Diag:
{
WinActivate ahk_class CabinetWClass
WinGetTitle, Title, ahk_class CabinetWClass ;打开“文件夹选项”,切换到“查看”选项卡,在高级设置列表框中勾选“在标题栏显示完整路径”,单击“确定”按钮使设置生效,现在访问文件夹路径时就会在左上角的标题栏显示完整路径
if Title=桌面
Title=%A_Desktop%
Send !{Tab}
ControlFocus, Edit1, A
send,{Backspace}
sleep
ControlSetText, Edit1, %Title%,A
send,{enter}
return
}
;将tc中路径发送到对话框
Sub_SendTcCurPath2Diag:
{
clipraw:=Clipboard
Clipboard =
PostMessage, , ,,, ahk_class TTOTAL_CMD
ClipWait,
srcDIR := Clipboard
Clipboard:=clipraw ;再发送剪贴板路径到控件
ControlFocus, Edit1, A
send,{Backspace}
sleep
ControlSetText, Edit1, %srcDIR%,A
send,{enter}
return
}
;将tc中路径发送到对话框-备份
Sub_SendTcCurPath2Diag2:
{
;将剪贴板中内容作为文件名
B_Clip2Name := false
B_ChangeDiagSize := true ;先获取TC中当前路径
clip:=Clipboard
Clipboard =
;TC_Msg := ,cm_CopySrcPathToClip
PostMessage, , ,,, ahk_class TTOTAL_CMD
ClipWait,
srcDIR := Clipboard
Clipboard:=clip ;再发送剪贴板路径到控件
ControlFocus, Edit1, A
send,{Backspace}
sleep
ControlSetText, Edit1, %srcDIR%,A
send,{enter}
;msgbox %clip%
if(B_Clip2Name){
Sleep
ControlSetText, Edit1, %clip%,A
}
;ControlSetText, Edit1, %text%,A
if(B_ChangeDiagSize){
;WinGetPos, xTB, yTB,lengthTB,hightTB, ahk_class Shell_TrayWnd
;改变对话框大小,省事就直接移动到100,100的位置,然后85%屏幕大小,否则就要详细结算任务栏在上下左右的位置
WinMove, A,,,, A_ScreenWidth * 0.85, A_ScreenHeight * 0.85
}
return
}
;在TC中打开对话框的路径
Sub_SendCurDiagPath2Tc:
{
WinGetText, CurWinAllText
Loop, parse, CurWinAllText, `n, `r
{
If RegExMatch(A_LoopField, "^地址: "){
curDiagPath := SubStr(A_LoopField,)
break
}
}
{
DiagPath := % curDiagPath
WinActivate ahk_class TTOTAL_CMD
PostMessage , , , , AHK_CLASS TTOTAL_CMD
ControlSetText, Edit1, cd %DiagPath%, ahk_class TTOTAL_CMD
Sleep
ControlSend, Edit1, {Enter}, ahk_class TTOTAL_CMD
}
return
}
;在系统资管中打开对话框的路径
Sub_SendCurDiagPath2Exp:
{
WinGetText, CurWinAllText
Loop, parse, CurWinAllText, `n, `r
{
If RegExMatch(A_LoopField, "^地址: "){
curDiagPath := SubStr(A_LoopField,)
break
}
}
{
DiagPath := % curDiagPath
run explorer.exe %DiagPath%
}
return
} ^F12::Reload
^F11::ExitApp
智能跳转---TC资源管理器的更多相关文章
- Mac Pro 资源管理器 Double Commander“个性化设置” 备份
操作系统自带的资源管理器,总是有些别扭的地方,在 Windows 系统下,我一般用 Total Commander(破解版)来作为替代品.现在换为 Mac 系统,自带的 Finer 也不怎么好用,连最 ...
- HDFS分布式文件系统资源管理器开发总结
HDFS,全称Hadoop分布式文件系统,作为Hadoop生态技术圈底层的关键技术之一,被设计成适合运行在通用硬件上的分布式文件系统.它和现有的分布式文件系统有很多共同点,但同时,它和其他的分布式 ...
- AssetBundle系列——资源的加载、简易的资源管理器
每个需要进行资源管理的类都继承自IAssetManager,该类维护它所使用到的所有资源的一个资源列表.并且每个资源管理类可以重写其资源引用接口和解引用接口. 每个管理器有自己的管理策略,比如Scen ...
- 用Total Commander替换windos默认资源管理器
用Total Commander替换windos默认资源管理器的方法 Total Commander(简称TC)是一个功能强大的资源管理器. TC本身没有自带的替换windows资源管理器的功能,就必 ...
- 【推荐】介绍两款Windows资源管理器,Q-Dir 与 FreeCommander XE(比TotalCommander更易用的免费资源管理器)
你是否也像我一样,随着硬盘.文件数量的增加,而感到对于文件的管理越来越乏力. 于是我试用了传说中的各种软件,包括各种Explorer外壳,或者第三方资源管理器. 最后我确定下来经常使用,并推荐给您的是 ...
- JTree实现电脑资源管理器
0.前言 最近老师布置了一项用Java写资源管理器的任务,一开始以为简单,但是实际操作起来,却发现网上的资源用起来相对生疏.在使用中,我也遇到了许多问题,虽然不能像其他博主一样,写的非常齐全,但我还是 ...
- Java开发桌面程序学习(八)——启动浏览器或者打开资源管理器操作与hyperlink超链接的使用
启动浏览器或者打开资源管理器 启动浏览器 java1.6版本以上,Desktop Desktop.getDesktop().browse(new URI("www.cnblogs.com/k ...
- 基于EasyHook实现监控explorer资源管理器文件复制、删除、剪切等操作
一.前言 最近自己在研究一个项目,需要实现对explorer资源管理器文件操作的监控功能,网上找到一些通过C++实现Hook explorer文件操作的方法,由于本人习惯用.NET开发程序,加之C/C ...
- 用Total Commander替换windos默认资源管理器的方法
Total Commander(简称TC)是一个功能强大的资源管理器. TC本身没有自带的替换windows资源管理器的功能,就必须自己动手解决了. 第一步先Google一下看有没有答案.当时搜出了不 ...
随机推荐
- sgu 125 Shtirlits dfs 难度:0
125. Shtirlits time limit per test: 0.25 sec. memory limit per test: 4096 KB There is a checkered fi ...
- GSM中时隙、信道、突发序列、帧的解释
刚从论坛中看到有人问GSM中时隙.信道.突发序列.帧知识.今天我们数字通信正好上到这一块,我就根据我知道的和网上搜索的回答! 1.时分多路复用技术 FDMA:频分多址 TDMA:时分多址 CDMA:码 ...
- HTTP Header之Content-Type
HTTP Header之Content-Type 目录 1. HTTP Header 2. 文件请求和接口请求 3. 几种 Content-Type 3.1 application/x-www-f ...
- ZOJ 17届校赛 How Many Nines
If we represent a date in the format YYYY-MM-DD (for example, 2017-04-09), do you know how many 9s w ...
- struts2 MVC模式
在学习struts2之前首先了解一下MVC模式. MVC是一个设计模式,它强制性的使应用程序的输入.处理和输出分开.使用MVC应用程序被分成三个核心部件:模型.视图.控制器.它们各自处理自己的任务.分 ...
- android系列9.LinearLayout 学习2
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android=&quo ...
- ubuntu vsftpd
With a bit of playing around I've managed to come up with a semi solution (not perfect but good enou ...
- 生成html报告并整合自动发动邮件功能
from HTMLTestRunner import HTMLTestRunnerfrom email.mime.text import MIMETextfrom email.header impor ...
- B. Beautiful Paintings
time limit per test 1 second memory limit per test 256 megabytes input standard input output standar ...
- (1)变量、常量、程序交互、数据类型、bool、基本运算符
什么是变量 变量由变量名和变量值组成 name = 'Alex Li' 这个算式就是将一个值赋予给变量,也就是声明变量的意思 name 就是一个变量,也是一个变量的名字 'Alex Li' 就是一个 ...