设置显示或者隐藏Total Commander、Everything和MasterSeeker和主窗口的快捷键的AutoHotkey脚本2026年8月6日
;======== 设置显示或者隐藏Total Commander、Everything和MasterSeeker和主窗口的快捷键的AutoHotkey脚本2026年8月6日 =========



设置显示或者隐藏Total Commander、Everything和MasterSeeker和主窗口的快捷键的AutoHotkey脚本2026年8月6日
REM 此文件的路径和文件名:D:\APP\RAR-SFX\mksfx.bat
生成自解压exe.bat
REM 以上是一行注释,说明这个批处理脚本大概的用途(可能是“生成exe.bat”之类),对执行没有任何影响
@ECHO OFF
REM 关闭命令回显,使批处理在执行时不在屏幕上逐行显示命令本身,只显示命令的输出结果,界面更干净
cd /d %~dp0
REM 切换当前工作目录到本批处理文件所在的目录
REM %~dp0 表示当前批处理文件所在的盘符和路径
REM /d 参数允许跨盘符切换目录(例如从C盘切换到D盘)
SET APPTitle=HotkeyF3F11波浪号_解压缩密码3
REM 设置一个名为 APPTitle 的环境变量
REM 其值为 "HotkeyF3F11波浪号_解压缩密码3",后续会用作生成的自解压EXE文件名的一部分
:: ??
REM 这是一行注释(:: 也是注释写法),大意是“终止进程”
REM 下面开始停止 Everything 搜索工具的相关进程和清理其数据库文件
taskkill /IM Everything.exe
REM 尝试通过镜像名称(Image Name)结束 Everything.exe 进程
REM 如果进程存在且允许正常退出,会发送关闭信号
:: ????
REM 注释大意是“强制结束进程/超时”
REM 下面使用强制方式确保 Everything.exe 被终止
taskkill /IM Everything.exe /F
REM /F 参数表示强制终止进程
REM 即使 Everything.exe 没有响应,也会被立即杀掉
del %~dp0..\Everything\Everything.db
REM 删除 Everything 的主数据库文件 Everything.db
REM 路径含义:当前批处理所在目录的上一级目录下的 Everything 文件夹中
del /f %~dp0..\Everything\Everything.db
REM 再次删除同一个 Everything.db 文件
REM /f 参数表示强制删除只读文件
REM 可能是为了防止文件因只读属性而无法删除
del %~dp0..\Everything\Everything.backup.db
REM 删除 Everything 的备份数据库文件 Everything.backup.db
del /f %~dp0..\Everything\Everything.backup.db
REM 强制删除 Everything 的备份数据库文件(防止只读属性)
:: ??
REM 注释大意是“终止进程”
REM 下面开始处理 MasterSeeker 搜索工具
taskkill /IM MasterSeeker.exe
REM 尝试正常结束 MasterSeeker.exe 进程
:: ????
REM 注释大意是“强制结束进程/超时”
taskkill /IM MasterSeeker.exe /F
REM 强制结束 MasterSeeker.exe 进程,确保退出
del %~dp0..\MasterSeeker\MasterSeekerLog.txt
REM 删除 MasterSeeker 的日志文件 MasterSeekerLog.txt
taskkill /IM TOTALCMD64.exe /F
del %~dp0..\TotalCMD\User\History.ini
del %~dp0..\TotalCMD\User\Tclog.2.txt
del %~dp0..\TotalCMD\User\Tclog.1.txt
del %~dp0..\TotalCMD\User\Tclog.txt
for /l %%i in (0,1,2) do (
REM 开始一个 for 循环,循环变量为 %%i
REM /l 表示使用数字序列,格式为 (开始,步长,结束)
REM 这里会从 0 开始,每次加 1,到 2 结束,总共循环 3 次(0、1、2)
REM 循环体用括号括起来,每次循环执行括号内的命令
echo %RANDOM% > c.tmp
REM 生成两个随机数(%RANDOM% 是 CMD 内置随机数,范围 0~32767)
REM 将两个随机数连续输出,并通过 > 重定向写入到当前目录下的 c.tmp 文件中
REM 每次循环都会覆盖 c.tmp 的内容,用于给 WinRAR 的自解压注释提供随机内容
"C:\Program Files\WinRAR\WinRAR.exe" a -ag -zc.tmp -iiconico.ico -m5 -r -sfx -zSFXCMD.txt ..\..\%APPTitle%_.exe ..\*.*
REM 调用 WinRAR 命令行,创建一个自解压(SFX)压缩包,参数详细解释如下:
REM "C:\Program Files\WinRAR\WinRAR.exe" —— WinRAR 主程序路径(64位版本)
REM a —— 添加到压缩文件(Add)
REM -ag —— 自动生成压缩文件名后缀(以当前日期时间作为后缀,避免重名)
REM -zc.tmp —— 从 c.tmp 文件中读取压缩文件注释(前面写入了随机数)
REM -iiconico.ico —— 为自解压EXE指定图标文件为 ico.ico
REM -m5 —— 使用最大压缩级别(压缩率最高,速度较慢)
REM -r —— 递归压缩子目录
REM -sfx —— 创建自解压可执行文件(SFX)
REM -zSFXCMD.txt —— 指定自解压模块的配置文件(包含解压路径、运行命令等)
REM ..\..\%APPTitle%_.exe —— 生成的EXE文件路径:上两级目录,文件名由 APPTitle 变量和自动后缀构成
REM ..\*.* —— 要压缩的源文件:当前目录及其子目录下的所有文件
)
REM for 循环体结束
start ..\..
REM 使用 start 命令打开上两级目录(资源管理器窗口)
REM 方便用户查看生成的EXE文件
exit
REM 退出当前批处理脚本(关闭CMD窗口)
REM "C:\Program Files (x86)\WinRAR\WinRAR.exe" a -zc.tmp -iiconico.ico -m5 -r -sfx -zSFXCMD.txt ..\..\%APPTitle%_%dt%.exe ..\*.*
REM 这一行是纯注释(REM开头),是备用命令或旧版本命令
REM 指向32位WinRAR路径,并且使用 %dt% 变量(脚本中未定义)作为文件名一部分
REM 实际不会被执行,仅供作者参考
; 此文件的路径和文件名:D:\APP\RAR-SFX\SFXCMD.txt
;下面的注释包含自解压脚本命令
;Path=解压缩路径
;Presetup=解压缩前运行
;Setup=解压缩后运行
; Setup=D:\APP\Notepad++\Notepad++.exe
;Silent=静默方式:1-隐藏全部 2-隐藏启动对话框 空着不设置-显示全部
;Overwrite=覆盖方式:1-覆盖全部文件 2-跳过已存在的文件 空着不设置-覆盖前询问
;请选择正确的图标并保存正确的配置文件
Presetup=D:\APP\RAR-SFX\Hotkey.exe
Setup=D:\APP\RAR-SFX\Hotkey.exe
Path=D:\APP\
Silent=2
Overwrite=2
; 此文件的路径和文件名:D:\APP\RAR-SFX\Hotkey.ahk
;======== 设置显示或者隐藏Total Commander主窗口的快捷键为~的AutoHotkey脚本2026年7月 =========
; 这一行是纯注释,以分号开头。说明这个脚本的功能:用 ~ 键显示/隐藏 Total Commander 窗口。
;======== 设置显示或者隐藏Everything主窗口的快捷键为F3的AutoHotkey脚本2026年7月 =========
; 这一行是纯注释。说明 Everything 搜索工具的显示/隐藏快捷键是 F3 键。
;======== 设置显示或者隐藏MasterSeeker主窗口的快捷键为F11的AutoHotkey脚本2026年7月 =========
; 这一行是纯注释。说明 MasterSeeker 搜索工具的显示/隐藏快捷键是 F11 键。
#NoEnv
; 指令:禁止脚本访问未初始化的环境变量。这样可以提高脚本安全性,避免意外读取系统环境变量导致错误。AutoHotkey 官方推荐在所有脚本开头使用。
#NoTrayIcon
; 指令:不显示系统托盘(右下角通知区域)中的 AutoHotkey 图标。脚本运行时用户看不到托盘图标,适合做后台静默工具。
#SingleInstance force
; 指令:如果当前脚本已经在运行,强制用新启动的脚本实例替换旧的实例。force 参数表示不询问用户直接替换。防止同一个脚本重复运行多个副本。
#MaxThreads 255
; 指令:设置 AutoHotkey 允许的最大线程数为 255。线程数越多,能同时处理的任务越多。这里设成最大值,确保热键响应不会因线程不足而排队等待。
DetectHiddenWindows,On
; 命令:打开"检测隐藏窗口"功能。默认情况下 AutoHotkey 找不到被隐藏的窗口。设为 On 后,WinExist、WinActivate 等命令可以操作被隐藏的窗口(比如最小到托盘的程序)。
SetTitleMatchMode,2
; 命令:设置窗口标题匹配模式为 2。模式 2 表示只要窗口标题"包含"你指定的文字就算匹配,不需要标题从头到尾完全一样。例如"Total Commander"能匹配"Total Commander - C:\"。
;-----------------------------------
; 多进程热键——快速响应随时中止 v2.1 By FeiYue
; 这是一段说明性注释,介绍下面这个类的功能。
;
; 1、一般的多进程热键,每次按热键都会重新启动一个进程
; 这会造成热键响应延迟,和频繁启动、退出进程。
; 这个库利用线程叠加和双进程交替重启的设计解决了上述问题
;
; 2、Go.Go("标签名或函数名", 序号可省略) 启动子进程
; Go.Go("清理标签或为空", 序号可省略) 停止子进程
;-----------------------------------
class Go { ;// 类开始
; 关键字 class:定义一个名为 Go 的类(面向对象编程)。类是一种把数据和功能打包在一起的方式。这里用来管理"子进程热键"系统。分号后面是注释。
init() {
; 定义一个名为 init 的方法(函数),属于 Go 类。这个方法负责初始化整个多进程热键系统。花括号 { 表示函数体开始。
static h:=Go.init()
; static 关键字:声明一个静态变量 h,只在第一次执行时初始化。这里调用 Go.init() 自身来完成初始化,并把返回值赋给 h。静态变量在函数执行完后不会消失,下次调用仍然保留。
#NoEnv
; 在子进程中也禁用环境变量检查(和脚本开头的 #NoEnv 作用一样)。
#NoTrayIcon
; 子进程也不显示托盘图标。
#SingleInstance force
; 子进程也强制单实例。
#MaxThreads 255
; 子进程也允许最大线程数。
if (A_Args.Length()>0)
; if 条件判断。A_Args 是内置变量,表示启动脚本时传入的命令行参数数组。Length() 返回参数个数。>0 表示有参数传入。如果有参数,说明当前这个脚本实例是一个"子进程"(由主进程启动并传了参数)。
{
; 花括号 { 表示 if 条件为真时执行的代码块开始。
Suspend, On
; 命令:挂起(禁用)所有热键和热字串。子进程中先挂起热键,防止子进程又去响应键盘按键导致无限循环。
flag:="Ahk_Sub"
; 给变量 flag 赋值字符串 "Ahk_Sub"。这个字符串用来作为子进程窗口的标识名,方便后续查找和关闭。
s:=RegExReplace(A_Args[1], "\s")
; A_Args[1] 是第一个命令行参数(传入的标签名或函数名)。RegExReplace 函数用正则表达式 "\s"(匹配所有空白字符:空格、Tab、换行)把参数中的空白全部替换为空字符串(即删除所有空白)。结果存入变量 s。
this.WinKill(flag "[" s "]")
; this 指当前 Go 类的实例。调用 Go 类的 WinKill 方法,传入窗口标题 "Ahk_Sub[标签名]"。作用是关闭已经存在的同名子进程窗口,避免重复。
r:=this.Menu_Go.Bind(this)
; this.Menu_Go 是 Go 类中的 Menu_Go 方法。.Bind(this) 创建一个绑定了 this 上下文的新函数引用,存入变量 r。这样后面菜单触发时能正确调用到类的方法。
Menu, MyMenu, Add, Run, % r
; Menu 命令:创建一个名为 MyMenu 的菜单,向其中添加一项,显示文字为 "Run",点击时执行变量 r 中保存的函数。
Gui, %flag%: Add, Text, 0x80 -Wrap
; Gui 命令:创建/操作 GUI(图形界面)。%flag% 展开为 "Ahk_Sub",所以是操作名为 Ahk_Sub 的 GUI。Add 表示添加控件。Text 表示添加一个文本控件。0x80 是样式(SS_NOPREFIX,防止 & 被解释为快捷键前缀)。-Wrap 表示文本不自动换行。这个文本控件用来在进程间传递数据(写入/读取文本)。
Gui, %flag%: Menu, MyMenu
; 把刚才创建的 MyMenu 菜单附加到 Ahk_Sub 这个 GUI 窗口上,这样窗口就有了菜单。
Gui, %flag%: Show, Hide, % flag "[" s "]"
; 显示 GUI 窗口。Hide 参数表示窗口创建后是隐藏的(不显示在屏幕上)。最后一个参数是窗口标题,展开后为 "Ahk_Sub[标签名]",方便用 WinExist 等命令找到这个窗口。
return
; 从当前子程序/函数返回,不再执行后面的代码。
Ahk_SubGuiClose:
; 这是一个标签(Label)。当名为 Ahk_Sub 的 GUI 窗口被关闭时(用户点 X 或脚本关闭窗口),AutoHotkey 会自动跳到这里执行。
Critical
; 命令:进入"关键线程"模式。在此模式下,当前线程不会被其他线程中断(包括热键),确保下面的操作能完整执行不被打断。
WinMenuSelectItem,,, 1&
; 命令:模拟选择窗口菜单项。三个逗号表示省略前三个参数(使用最后找到的窗口和默认菜单)。1& 表示选择第 1 个菜单项下带 & 的项(即 Run),这会触发之前绑定的 Menu_Go 函数。
return
; 从标签处返回。
}
; if 代码块的结束花括号。
else
; 如果 A_Args.Length() 不大于 0(即没有命令行参数),说明当前脚本是"主进程"(用户直接双击或通过热键启动的)。
{
; else 代码块开始。
flag:="Ahk_Main"
; 给变量 flag 赋值为 "Ahk_Main",作为主进程窗口的标识名。
this.WinKill(flag)
; 调用 WinKill 方法关闭之前可能存在的同名主进程窗口。
Gui, %flag%: Show, Hide, % flag
; 创建并显示一个名为 Ahk_Main 的隐藏 GUI 窗口,标题就是 "Ahk_Main"。
OnExit(this.WinKill.Bind(this,"Ahk_Sub"))
; OnExit 命令:当脚本退出时(用户退出或 ExitApp),自动执行指定的函数。这里绑定了 WinKill 方法,传入参数 "Ahk_Sub",确保脚本退出时清理子进程。
Menu, Tray, Icon
; 命令:显示托盘图标。主进程需要显示托盘图标,方便用户右键退出等操作。
}
; else 代码块结束。
}
; init 方法结束的花括号。
Menu_Go() {
; 定义 Go 类的 Menu_Go 方法。当子进程的菜单项被选中时调用此方法。
ControlGetText, s
; 命令:从 GUI 的默认控件(之前创建的 Text 文本控件)中读取文本内容,存入变量 s。这个文本是主进程通过 ControlSetText 写入的(比如 "aaa" 或 "bbb")。
s:=Trim(s)
; 调用 Trim 函数删除变量 s 两端的空格和制表符,确保内容干净。
if (s="Reload")
; 如果 s 的内容是 "Reload",说明主进程要求子进程重启自己。
{
; if 代码块开始。
WinGetTitle, s
; 命令:获取当前窗口(子进程 GUI 窗口)的标题,存入变量 s。标题格式是 "Ahk_Sub[标签名]"。
this.RunAhk(RegExReplace(s,"Ahk_Sub\[|]"))
; RegExReplace(s,"Ahk_Sub\[|]") 用正则把标题中的 "Ahk_Sub[" 和 "]" 去掉,只留下标签名。然后调用 RunAhk 方法用这个标签名重新启动一个新的子进程。
ExitApp
; 命令:退出当前脚本实例(即退出旧的子进程)。
}
; if 代码块结束。
if IsLabel(s)
; IsLabel 函数检查当前脚本中是否存在名为 s 的标签(比如 aaa、bbb、ccc 都是标签/函数)。
gosub, %s%
; gosub 命令:跳转到名为 s 的标签处执行代码。%s% 表示变量 s 的值作为标签名。执行完标签处的代码后会返回这里。
else if IsFunc(s)
; 如果 s 不是标签,再检查 s 是否是一个已定义的函数名。
%s%()
; 如果是函数名,就调用这个函数。%s% 展开为函数名,后面的 () 表示调用。
loop
; loop 命令不带参数表示无限循环。
Sleep, 60000
; 命令:让当前线程休眠 60000 毫秒(60 秒)。无限循环 + 长时间休眠的作用是让子进程保持运行但不占用 CPU,等待主进程通过 ControlSetText 发来新指令。
}
; Menu_Go 方法结束。
WinKill(flag) {
; 定义 Go 类的 WinKill 方法。参数 flag 是窗口标识名(如 "Ahk_Sub" 或 "Ahk_Main")。作用是关闭所有匹配这个标识的 AutoHotkey 进程窗口。
DetectHiddenWindows, On
; 打开检测隐藏窗口,这样才能找到隐藏的子进程 GUI 窗口。
WinGet, list, List, % flag " ahk_class AutoHotkeyGUI"
; WinGet 命令:获取所有匹配的窗口列表。List 子命令返回窗口句柄数组。过滤条件是窗口标题包含 flag 字符串,且窗口类名为 AutoHotkeyGUI(AutoHotkey 创建的 GUI 窗口的类名)。结果存入 list 变量。
loop % list
; loop 命令:遍历 list 数组。% list 表示循环次数为 list 的数量(找到的窗口个数)。
IfWinExist, % "ahk_id " list%A_Index%
; IfWinExist 命令检查窗口是否存在。ahk_id 后面跟窗口句柄。list%A_Index% 表示取数组中第 A_Index 个句柄(A_Index 是当前循环序号,从 1 开始)。
{
; 如果窗口存在,执行下面的代码块。
WinGet, pid, PID
; WinGet 命令:获取当前找到的窗口的进程 ID(PID),存入变量 pid。
WinClose, ahk_class AutoHotkey ahk_pid %pid%,, 3
; WinClose 命令:关闭指定窗口。这里用 ahk_pid 指定进程 ID 来定位窗口。ahk_class AutoHotkey 进一步限定是 AutoHotkey 脚本窗口。最后的 3 是超时时间(秒),如果 3 秒内窗口没关闭就继续。
IfWinExist,,, Process, Close, %pid%
; IfWinExist 命令的特殊用法:如果窗口仍然存在(即 WinClose 没成功关掉),则执行逗号后面的命令。Process, Close, %pid% 命令强制结束指定 PID 的进程。
}
; 代码块结束。
DetectHiddenWindows, Off
; 关闭检测隐藏窗口,恢复默认设置,避免影响脚本其他部分。
}
; WinKill 方法结束。
RunAhk(s="") {
; 定义 Go 类的 RunAhk 方法。参数 s 是要传递给子进程的命令行参数(标签名),默认为空字符串。作用是启动一个新的 AutoHotkey 子进程。
if (A_IsCompiled)
; A_IsCompiled 是内置变量,如果当前脚本是编译成 exe 的版本则为 true,否则为 false。
Run, "%A_ScriptFullPath%" /f %s%
; 如果已编译:Run 命令启动当前 exe 文件(A_ScriptFullPath 是当前脚本完整路径)。/f 是自定义参数标记,后面跟 s(标签名)。子进程启动时 A_Args 就能收到这个参数。
else
; 如果当前脚本是 ahk 源码形式(未编译)。
Run, "%A_AhkPath%" /f "%A_ScriptFullPath%" %s%
; 用 AutoHotkey 解释器(A_AhkPath 是 AutoHotkey.exe 的路径)来运行当前脚本文件(A_ScriptFullPath),同样传入 /f 和标签名参数。
}
; RunAhk 方法结束。
Go(LabelOrFuncName="", index=0) {
; 定义 Go 类的核心方法 Go。参数 LabelOrFuncName 是要执行的函数/标签名,默认为空(空表示停止子进程)。index 是子进程序号,默认为 0。这是整个多进程热键系统的入口。
static arr:=[]
; static 声明静态变量 arr,初始化为空数组。用来记录每个 index 对应的线程计数和进程切换状态。静态变量在多次调用之间保持值不变。
DetectHiddenWindows, On
; 打开检测隐藏窗口,以便找到子进程 GUI 窗口。
SetFormat, IntegerFast, d
; 命令:设置数字格式。IntegerFast 表示快速整数格式,d 表示十进制。确保后面的数值操作以十进制进行。
index:=Floor(index), (!arr[index] && arr[index]:=[0,0])
; 这行做了两件事,用逗号分隔成两个表达式:
; 1. index:=Floor(index) —— Floor 函数把 index 向下取整,确保它是整数。
; 2. (!arr[index] && arr[index]:=[0,0]) —— 如果 arr[index] 为假(未定义或为 0),则把 arr[index] 初始化为数组 [0,0]。这个数组第一个元素记录线程计数,第二个元素记录当前用的是哪个子进程(0 或 1,双进程交替)。
, ii:=Floor(arr[index][1]), jj:=Floor(arr[index][2])
; 继续用逗号分隔的表达式:从 arr[index] 数组中取出两个值。
; ii 是 arr[index][1](线程计数),Floor 取整。
; jj 是 arr[index][2](当前子进程编号,0 或 1),Floor 取整。
, tt:="Ahk_Sub[" index "_" jj "]"
; 构造子进程窗口标题。格式如 "Ahk_Sub[0_0]" 或 "Ahk_Sub[0_1]"。index 和 jj 拼在一起唯一标识一个子进程窗口。
if (++ii>100)
; 先把 ii 加 1(线程计数加 1),然后判断是否大于 100。如果超过 100 个线程叠加,说明当前子进程可能太"重"了,需要切换。
{
; 如果超过 100,进入切换逻辑。
IfWinExist, % tt
; 检查当前子进程窗口是否存在。
{
; 如果存在:
ControlSetText,, Reload
; ControlSetText 命令:向窗口的默认控件(Text 控件)写入文本 "Reload"。子进程读到 "Reload" 后会重启自己。
WinClose
; WinClose 命令:关闭当前子进程窗口(关闭后会由下面的 RunAhk 启动新的)。
}
; IfWinExist 为真时的代码块结束。
else
; 如果当前子进程窗口不存在:
this.RunAhk(index "_" jj)
; 直接调用 RunAhk 启动一个新的子进程,传入 "index_jj" 作为参数(如 "0_0")。
arr[index][2]:=jj:=!jj, ii:=1
; 切换子进程编号:!jj 是取反(0 变 1,1 变 0)。jj 更新后存入 arr[index][2]。同时 ii 重置为 1(新进程的线程计数从 1 开始)。
, tt:="Ahk_Sub[" index "_" jj "]"
; 重新构造新的子进程窗口标题(因为 jj 变了)。
}
; if (++ii>100) 代码块结束。
arr[index][1]:=ii
; 把更新后的线程计数 ii 存回数组中。
IfWinNotExist, % tt
; 检查当前应该存在的子进程窗口(tt)是否不存在。
{
; 如果不存在:
this.RunAhk(index "_" jj)
; 调用 RunAhk 启动子进程。
WinWait, % tt,, 3
; WinWait 命令:等待标题为 tt 的窗口出现。第三个参数 3 表示最多等 3 秒。超时则继续往下执行。
}
; IfWinNotExist 代码块结束。
IfWinExist, % tt
; 再次检查子进程窗口是否存在(可能是刚才启动的)。
{
; 如果存在:
ControlSetText,, % LabelOrFuncName
; 向子进程窗口的 Text 控件写入要执行的函数/标签名(如 "aaa")。子进程的 Menu_Go 方法会读到这个文本并执行对应函数。
WinClose
; 关闭子进程窗口。子进程在关闭时会触发 GuiClose → 选择菜单 Run → 执行 Menu_Go → 执行对应的函数。这是一种进程间通信方式。
}
; IfWinExist 代码块结束。
DetectHiddenWindows, Off
; 关闭检测隐藏窗口,恢复默认。
}
; Go 方法结束。
} ;// 类结束
; 花括号结束 Go 类的定义。分号后面是注释。
tcfile=%A_ScriptDir%\..\TotalCMD\TotalCMD64.exe
; 给变量 tcfile 赋值。A_ScriptDir 是内置变量,表示当前脚本所在的目录。\..\ 表示上一级目录。所以完整路径是:脚本目录的上一级\TotalCMD\TotalCMD64.exe。这是 Total Commander 的可执行文件路径。
IfExist,%tcfile%
; IfExist 命令:检查文件是否存在。如果存在就执行下面花括号内的代码。
{
; IfExist 代码块开始。
; 2 = SW_SHOWMINIMIZED 最小化显示(在任务栏)
; 这是一行注释,解释下面 DllCall 中参数 2 的含义:SW_SHOWMINIMIZED 是 Windows API 常量,值为 2,表示窗口以最小化状态显示。
DllCall("shell32\ShellExecute", "uint", 0, "uint", 0 , "str", tcfile, "uint", 0, "uint", 0, "int", 2)
; DllCall 命令:直接调用 Windows 的动态链接库(DLL)函数。这里调用 shell32.dll 中的 ShellExecute 函数。
; 参数说明:
; "shell32\ShellExecute" —— 要调用的 DLL 和函数名。
; "uint", 0 —— 第一个参数 hwnd(父窗口句柄),0 表示无。
; "uint", 0 —— 第二个参数 lpOperation(操作),0 表示 "open"(打开)。
; "str", tcfile —— 第三个参数 lpFile(要打开的文件),传入 tcfile 变量(TotalCMD 路径)。
; "uint", 0 —— 第四个参数 lpParameters(命令行参数),0 表示无额外参数。
; "uint", 0 —— 第五个参数 lpDirectory(工作目录),0 表示使用当前目录。
; "int", 2 —— 第六个参数 nShowCmd(显示方式),2 = SW_SHOWMINIMIZED(最小化)。
; 整行作用:以最小化方式启动 Total Commander。
loop 6000
; loop 命令:循环 6000 次。每次循环里尝试隐藏 TC 窗口。
{
; 循环体开始。
DetectHiddenWindows,On
; 打开检测隐藏窗口,确保能找到 TC 窗口(即使它被隐藏)。
WinHide,Total Commander
; WinHide 命令:隐藏标题包含 "Total Commander" 的窗口。
WinHide,ahk_exe TotalCMD64.exe
; WinHide 命令:隐藏由 TotalCMD64.exe 进程创建的所有窗口。ahk_exe 是按进程名匹配。
WinHide,ahk_class TTOTAL_CMD
; WinHide 命令:隐藏窗口类名为 TTOTAL_CMD 的窗口。ahk_class 是按窗口类名匹配。Total Commander 的窗口类名就是 TTOTAL_CMD。
DetectHiddenWindows,Off
; 关闭检测隐藏窗口,恢复默认。
IfWinNotExist,Total Commander ahk_class TTOTAL_CMD
; IfWinNotExist 命令:检查标题包含 "Total Commander" 且类名为 TTOTAL_CMD 的窗口是否不存在。
{
; 如果窗口不存在了(说明已经成功隐藏/关闭):
DetectHiddenWindows,On
; 再次打开检测隐藏窗口(虽然这里马上 break,但保持一致性)。
break
; break 命令:跳出当前循环(不再继续 loop 6000)。
}
; IfWinNotExist 代码块结束。
Sleep,1
; 命令:当前线程休眠 1 毫秒。给系统一点时间处理窗口消息,避免 CPU 占用 100%。
}
; 循环体结束。
}
; IfExist 代码块结束。
;======== 设置显示或者隐藏 Total Commander 主窗口的快捷键为 ~ 键 =========
; 注释:说明下面这行热键的作用。
; (~键位于键盘主键区Esc键正下方)
; 注释:告诉用户 ~ 键在键盘上的位置。
; https://www.ghisler.com/download.htm
; 注释:Total Commander 官方下载地址。
; QuickSearch eXtended-2.2.6-TotalCommander拼音首字母筛选插件
; 注释:提到一个 TC 的插件。
; https://www.ghisler.ch/board/viewtopic.php?t=22592
; 注释:插件相关论坛链接。
`::Go.Go("aaa")
; 热键定义:反引号 ` (即 ~ 键,在 Esc 下面)被按下时触发。
; 双冒号 :: 是 AutoHotkey 的热键语法。左边是按键,右边是要执行的代码。
; Go.Go("aaa") 调用 Go 类的 Go 方法,传入字符串 "aaa",表示要执行 aaa 函数。
; 注意:反引号 ` 在 AutoHotkey 中就是 ~ 键(因为 ~ 在 AHK 中有特殊含义,所以用 ` 代替)。
; 等待指定标题窗口出现
; 注释:说明下面这行被注释掉的代码原本的意图。
;WinWait, ahkin - Everything ahk_class EVERYTHING ahk_exe Everything.exe
; 被注释掉的 WinWait 命令。如果取消注释,会等待 Everything 窗口出现。现在不执行。
;======== 设置显示或者隐藏 MasterSeeker 主窗口的快捷键为 F3 键 =========
; 注释:说明下面 F3 热键的功能。
; (F3键位于键盘主键区4键正上方)
; 注释:F3 键的位置。
; https://www.voidtools.com/zh-cn/downloads/
; 注释:Everything 下载页面。
; 版本选择有索引文件正文内容功能的 V1.5.0.1415b 或者 V1.5.0.1415b 比较新或者比较旧的版本没有索引文件正文内容功能
; 注释:提醒 Everything 版本选择。
; https://www.voidtools.com/forum/viewtopic.php?p=81104
; 注释:论坛链接。
; https://www.voidtools.com/forum/viewtopic.php?t=9787&start=150
; 注释:论坛链接。
F3::Go.Go("bbb")
; 热键定义:F3 键被按下时,调用 Go.Go("bbb"),执行 bbb 函数(控制 Everything 窗口的显示/隐藏)。
;======== 设置显示或者隐藏 MasterSeeker 主窗口的快捷键为 F11 键 =========
; 注释:说明 F11 热键的功能。
; (F11键位于键盘主键区BackSpace键上方)
; 注释:F11 键的位置描述。
; http://master-seeker.com/
; 注释:MasterSeeker 官网。
; MasterSeeker依赖.NET Framework 2.0运行库,没有.NET 2.0运行库无法运行MasterSeeker
; 注释:提醒依赖 .NET Framework 2.0。
; MasterSeeker建立索引比较快,并且MasterSeeker能够在完成所有索引之前先显示部分搜索结果。能抢先显示部分搜索结果。
; 注释:MasterSeeker 的特点说明。
F11::Go.Go("ccc")
; 热键定义:F11 键被按下时,调用 Go.Go("ccc"),执行 ccc 函数(控制 MasterSeeker 窗口的显示/隐藏)。
aaa()
{
; 定义函数 aaa。这是被 Go.Go("aaa") 调用时执行的函数,用来显示或隐藏 Total Commander 窗口。花括号是函数体开始。
SetTitleMatchMode,2
; 命令:设置窗口标题匹配模式为 2(包含匹配)。
; IfWinActive,Total Commander ahk_class TTOTAL_CMD
; 被注释掉的代码行。原来是检查 TC 窗口是否激活。现在不执行。
WinGetPos, , ,TCOutWidth,TCOutHeight,Total Commander ahk_class TTOTAL_CMD
; WinGetPos 命令:获取指定窗口的位置和大小。
; 第一个参数(留空)是输出 X 坐标的变量(忽略)。
; 第二个参数(留空)是输出 Y 坐标的变量(忽略)。
; 第三个参数 TCOutWidth:输出窗口宽度。
; 第四个参数 TCOutHeight:输出窗口高度。
; 最后一个参数 "Total Commander ahk_class TTOTAL_CMD" 是窗口匹配条件(标题包含 + 类名)。
; 这行获取 TC 窗口的宽和高,存入 TCOutWidth 和 TCOutHeight。
;ToolTip,窗口宽度:%MSOutWidth% 窗口高度:%MSOutHeight%
; 被注释掉的 ToolTip 命令。如果取消注释,会在屏幕上显示变量值的提示框。
DetectHiddenWindows,Off
; 命令:关闭检测隐藏窗口。这里先关掉,因为后面用 WinExist 和 WinActive 时,如果 TC 是隐藏的,WinActive 会返回 false,这样就能进入 else 分支来显示窗口。
if (WinExist("Total Commander ahk_class TTOTAL_CMD") and WinActive("Total Commander ahk_class TTOTAL_CMD") and TCOutWidth>400 and TCOutHeight>400)
; if 条件判断,由四个条件用 and 连接:
; 1. WinExist("Total Commander ahk_class TTOTAL_CMD") —— TC 窗口存在(即使隐藏也算存在)。
; 2. WinActive("Total Commander ahk_class TTOTAL_CMD") —— TC 窗口当前是激活状态(前台窗口)。
; 3. TCOutWidth>400 —— 窗口宽度大于 400 像素。
; 4. TCOutHeight>400 —— 窗口高度大于 400 像素。
; 四个条件都满足,说明 TC 窗口是正常打开且激活的大窗口,应该隐藏它。
{
; if 条件为真时的代码块开始。
DetectHiddenWindows,On
; 打开检测隐藏窗口,这样才能操作被隐藏的窗口(虽然现在还没隐藏,但下面 WinHide 后窗口就隐藏了,保持一致)。
WinMinimize,Total Commander ahk_class TTOTAL_CMD
; WinMinimize 命令:最小化 TC 窗口。
WinHide,Total Commander ahk_class TTOTAL_CMD
; WinHide 命令:隐藏 TC 窗口(从任务栏也消失)。
}
; if 代码块结束。
else
; 如果上面的 if 条件不满足(TC 不存在、没激活、或尺寸太小),说明需要显示 TC 窗口。
{
; else 代码块开始。
DetectHiddenWindows,On
; 打开检测隐藏窗口,这样才能找到并操作被隐藏的 TC 窗口。
WinActivate,Total Commander ahk_class TTOTAL_CMD
; WinActivate 命令:激活(切换到前台)TC 窗口。
WinShow,Total Commander ahk_class TTOTAL_CMD
; WinShow 命令:如果 TC 窗口是隐藏状态,把它显示出来。
WinGet, WinTCID, ID,Total Commander ahk_class TTOTAL_CMD
; WinGet 命令:获取 TC 窗口的唯一 ID(句柄),存入变量 WinTCID。ID 是 Windows 内部用来标识窗口的唯一数字。
DllCall("SwitchToThisWindow", "UInt", WinTCID, "UInt", 1)
; DllCall 调用 Windows API 函数 SwitchToThisWindow。第一个参数是窗口句柄(WinTCID),第二个参数 1 表示强制切换到该窗口。这确保 TC 窗口被带到前台并获得焦点。
WinMove,Total Commander ahk_class TTOTAL_CMD,,0,0,A_ScreenWidth,A_ScreenHeight
; WinMove 命令:移动并调整窗口大小。
; 参数:窗口标题、省略(留空)、X 坐标 0、Y 坐标 0、宽度 A_ScreenWidth(屏幕宽度)、高度 A_ScreenHeight(屏幕高度)。
; 这行把 TC 窗口移动到屏幕左上角并拉伸到全屏大小。
WinMaximize,Total Commander ahk_class TTOTAL_CMD
; WinMaximize 命令:最大化 TC 窗口。
IfWinNotExist,Total Commander ahk_class TTOTAL_CMD
; IfWinNotExist 命令:检查 TC 窗口是否不存在(可能之前没启动过,或者被关闭了)。
{
; 如果 TC 窗口不存在:
IfExist,%A_ScriptDir%\..\TotalCMD\TotalCMD64.exe
; IfExist 命令:检查 Total Commander 可执行文件是否存在。
{
; 如果文件存在:
Run,%A_ScriptDir%\..\TotalCMD\TotalCMD64.exe
; Run 命令:启动 Total Commander 程序。
}
; IfExist 代码块结束。
else
; 如果 Total Commander 文件不存在:
{
; else 代码块开始。
MsgBox,0,,找不到文件 %A_ScriptDir%\..\TotalCMD\TotalCMD64.exe,5
; MsgBox 命令:弹出一个消息框。
; 参数:0 是选项(只有"确定"按钮),空(标题留空),"找不到文件..."是要显示的文字,最后的 5 是超时时间(5 秒后自动关闭消息框)。
ExitApp
; 命令:退出当前 AutoHotkey 脚本。因为 TC 都启动不了,后面的事没法做。
}
; else 代码块结束。
}
; IfWinNotExist 代码块结束。
}
; else 代码块结束。
Go.Go()
; 调用 Go.Go()(不传参数)。这会向子进程发送一个空指令,子进程收到后 Menu_Go 会执行 IsLabel("") 和 IsFunc("") 都为 false,然后进入无限休眠。实际上这行的作用是"结束当前子进程任务",让子进程回到待命状态。
}
; aaa 函数结束。
bbb()
{
; 定义函数 bbb。被 Go.Go("bbb") 调用,控制 Everything 窗口的显示/隐藏。
#NoEnv
; 指令:禁用环境变量检查。
#NoTrayIcon
; 指令:不显示托盘图标。
#SingleInstance force
; 指令:强制单实例。
#MaxThreads 255
; 指令:最大线程数 255。
DetectHiddenWindows,On
; 命令:打开检测隐藏窗口。
SetTitleMatchMode,2
; 命令:窗口标题模糊匹配模式。
;WinGet, state, MinMax, Everything ahk_class EVERYTHING ahk_exe Everything.exe
; 被注释掉的代码。原本用来获取 Everything 窗口的最大化/最小化状态。
;InTray:=IsInTray("ahk_exe Everything.exe")
; 被注释掉的代码。原本用来检查 Everything 是否在系统托盘中。
WinGetPos,EVOutX, EVOutY, EVOutWidth, EVOutHeight,Everything ahk_class EVERYTHING ahk_exe Everything.exe
; WinGetPos 命令:获取 Everything 窗口的位置和大小。
; EVOutX 接收 X 坐标,EVOutY 接收 Y 坐标,EVOutWidth 接收宽度,EVOutHeight 接收高度。
; 窗口匹配条件:标题包含 "Everything",类名 EVERYTHING,进程名 Everything.exe。
IsWinVisible_1:=(A_ScreenWidth/2-10-EVOutWidth)<10
; 计算并赋值。A_ScreenWidth 是屏幕宽度。A_ScreenWidth/2-10-EVOutWidth 是"屏幕一半减10再减窗口宽度"。如果这个差值小于 10,说明窗口宽度接近屏幕一半(即窗口在右半屏且大小合适)。结果存入 IsWinVisible_1(实际是判断窗口是否在正确位置)。
IsWinVisible_2:=(A_ScreenHeight-90-EVOutHeight)<10
; 类似上面:A_ScreenHeight-90-EVOutHeight 是"屏幕高度减90再减窗口高度"。如果小于 10,说明窗口高度接近屏幕高度减 90(即窗口在正确高度)。结果存入 IsWinVisible_2。
IsWinVisible_3:=if WinActive("Everything ahk_class EVERYTHING ahk_exe Everything.exe")
; 判断 Everything 窗口是否当前激活。WinActive 返回窗口 ID(非零为真)或 0(假)。if 在这里把结果转为 true/false 存入 IsWinVisible_3。三个变量合起来判断 Everything 是否已经正确显示并激活。
;ToolTip,宽:%IsWinVisible_1%`n`n高:%IsWinVisible_2%`n`n激活:%IsWinVisible_3%`n`n`n`n`n`n`n`n`n`n`n
; 被注释掉的 ToolTip。用来调试显示三个变量的值。`n 是换行符。
if (IsWinVisible_1 && IsWinVisible_2 && IsWinVisible_3)
; if 判断:三个条件都为 true(窗口在正确位置、正确高度、且激活),说明 Everything 已经正常显示,应该隐藏它。
{
; if 代码块开始。
; ToolTip,"窗口宽度"%MSOutWidth%"大于500时最小化MasterSeeker窗口"
; 被注释掉的 ToolTip。
; WinHide,MasterSeeker 1.5.1 by DxCK
; 被注释掉的 WinHide。
WinMinimize,Everything ahk_class EVERYTHING ahk_exe Everything.exe
; WinMinimize 命令:最小化 Everything 窗口。
WinHide,Everything ahk_class EVERYTHING ahk_exe Everything.exe
; WinHide 命令:隐藏 Everything 窗口。
;ToolTip,0
; 被注释掉的 ToolTip 关闭命令。
}
; if 代码块结束。
else
; 如果 Everything 没有正常显示(需要显示它):
{
; else 代码块开始。
;ToolTip,1
; 被注释掉的 ToolTip。
IfExist,%A_ScriptDir%\..\Everything\Everything.exe
; IfExist 命令:检查 Everything 程序文件是否存在。
{
; 如果存在:
Run,%A_ScriptDir%\..\Everything\Everything.exe
; Run 命令:启动 Everything。
Sleep,200
; 命令:休眠 200 毫秒,等待 Everything 启动。
Run,%A_ScriptDir%\..\Everything\Everything.exe
; 再次启动 Everything。因为 Everything 如果已经在运行,第二次启动会激活已有窗口(Everything 的单实例特性)。
Sleep,200
; 再休眠 200 毫秒。
}
; IfExist 代码块结束。
else
; 如果 Everything 程序文件不存在:
{
; else 代码块开始。
MsgBox,0,,找不到文件 %A_ScriptDir%\..\Everything\Everything.exe,5
; MsgBox 命令:弹出消息框提示找不到 Everything.exe,5 秒后自动关闭。
ExitApp
; 退出脚本。
}
; else 代码块结束。
WinShow,Everything ahk_class EVERYTHING ahk_exe Everything.exe
; WinShow 命令:显示 Everything 窗口(如果它是隐藏状态)。
WinGet, WinMSID, ID,Everything ahk_class EVERYTHING ahk_exe Everything.exe
; WinGet 命令:获取 Everything 窗口的唯一 ID(句柄),存入 WinMSID。
DllCall("SwitchToThisWindow", "UInt", WinMSID, "UInt", 1)
; DllCall 调用 Windows API SwitchToThisWindow,强制把 Everything 窗口切换到前台。
loop,5000
; loop 命令:循环最多 5000 次,尝试激活 Everything 窗口。
{
; 循环体开始。
WinActivate,Everything ahk_class EVERYTHING ahk_exe Everything.exe
; WinActivate 命令:尝试激活 Everything 窗口。
IfWinActive,Everything ahk_class EVERYTHING ahk_exe Everything.exe
; IfWinActive 命令:检查 Everything 窗口是否已经激活。
break
; 如果已经激活,break 跳出循环。
Sleep,1
; 休眠 1 毫秒,让系统处理窗口消息。
}
; 循环体结束。
; WinMove,ahk_class WindowsForms10.Window.8.app.0.218f99c,,0,0,A_ScreenWidth,A_ScreenHeight
; 被注释掉的 WinMove。原本用来移动 Everything 窗口到全屏。
; WinMaximize,ahk_class WindowsForms10.Window.8.app.0.218f99c
; 被注释掉的 WinMaximize。
loop,5000
; 循环最多 5000 次,调整 Everything 窗口大小和位置。
{
; 循环体开始。
WinMove,Everything ahk_class EVERYTHING ahk_exe Everything.exe,,A_ScreenWidth/2,20,A_ScreenWidth/2-10,A_ScreenHeight-90
; WinMove 命令:移动并调整 Everything 窗口。
; X = A_ScreenWidth/2(屏幕正中间偏右,即右半屏左边)
; Y = 20(距离屏幕顶部 20 像素)
; Width = A_ScreenWidth/2-10(屏幕宽度的一半减 10 像素)
; Height = A_ScreenHeight-90(屏幕高度减 90 像素)
; 效果:Everything 窗口占据右半屏,顶部留 20px,底部留 90px。
WinGetPos,X,Y,W,H,Everything ahk_class EVERYTHING ahk_exe Everything.exe
; WinGetPos 命令:重新获取 Everything 窗口的位置和大小,存入 X, Y, W, H。
;默认窗口大小 左右W745,上下H358
; 注释:记录默认窗口尺寸参考值。
;默认窗口大小 左右W931,上下H449
; 注释:另一台电脑的默认窗口尺寸。
;电脑1调整后窗口大小 左右W950,上下H990
; 注释:电脑1调整后的尺寸。
;电脑2调整后窗口大小 左右W790,上下H810
; 注释:电脑2调整后的尺寸。
;MsgBox %H%
; 被注释掉的 MsgBox,用来调试显示 H 的值。
if ((A_ScreenHeight-90-H)<10)
; 判断:屏幕高度减 90 再减窗口实际高度 H,如果差值小于 10,说明窗口高度已经接近目标高度(A_ScreenHeight-90)。
break
; 如果高度正确,跳出循环。
Sleep,1
; 休眠 1 毫秒。
}
; 循环体结束。
loop,5000
; 循环最多 5000 次,尝试把焦点设置到 Everything 的搜索框。
{
; 循环体开始。
ControlFocus,Edit1,Everything ahk_class EVERYTHING ahk_exe Everything.exe
; ControlFocus 命令:把键盘焦点设置到 Everything 窗口中的 Edit1 控件上。Edit1 是 Everything 搜索框的控件名。
ControlGetFocus, OutputVar,Everything ahk_class EVERYTHING ahk_exe Everything.exe
; ControlGetFocus 命令:获取当前拥有焦点的控件的类名,存入 OutputVar。
;MsgBox,%OutputVar%
; 被注释掉的 MsgBox,用来调试显示 OutputVar 的值。
Sleep,1
; 休眠 1 毫秒。
if (OutputVar="Edit1")
; 判断:如果 OutputVar 等于 "Edit1",说明焦点已经成功到了搜索框。
break
; 跳出循环。
}
; 循环体结束。
; 参数: start=0, end=-1 表示全选
; 注释:说明下面 SendMessage 参数的含义。
loop,1
; loop 1 表示只循环 1 次(其实就是执行一次下面的代码块)。
{
; 循环体开始。
SendMessage,0xB1, 0, -1,Edit1,ahk_class EVERYTHING ahk_exe Everything.exe
; SendMessage 命令:向 Edit1 控件发送 Windows 消息。
; 0xB1 是 EM_SETSEL 消息(选中编辑框中的文本)。
; 第二个参数 0 是起始位置(第 0 个字符)。
; 第三个参数 -1 是结束位置(-1 表示到文本末尾)。
; 合起来:选中编辑框中的所有文本(全选)。
; 最后的参数是目标窗口和控件。
Sleep,1
; 休眠 1 毫秒。
;Send,{Up}
; 被注释掉的 Send 命令。原本用来发送向上箭头键。
}
; 循环体结束。
}
; bbb 函数结束。
Go.Go()
; 调用 Go.Go() 无参数,让子进程回到待命状态(同 aaa 中的解释)。
}
; 注意:这个花括号实际上是 ccc 函数体的一部分,但因为在原始脚本中 Go.Go() 后面紧跟着 ccc() 的定义,这里其实是 bbb 结束后的独立调用。实际上这个 Go.Go() 属于 bbb 函数的最后一行,上面已经解释过了。此行后面的 } 是 ccc 函数结束。
ccc()
{
; 定义函数 ccc。被 Go.Go("ccc") 调用,控制 MasterSeeker 窗口的显示/隐藏。
#NoEnv
; 指令:禁用环境变量检查。
#NoTrayIcon
; 指令:不显示托盘图标。
#SingleInstance force
; 指令:强制单实例。
#MaxThreads 255
; 指令:最大线程数 255。
DetectHiddenWindows,On
; 命令:打开检测隐藏窗口。
SetTitleMatchMode,2
; 命令:窗口标题模糊匹配。
; WinWait, MasterSeeker 1.5.1 by DxCK ahk_class WindowsForms10.Window.8.app.0.134c08f_r6_ad1 ahk_exe MasterSeeker.exe
; 被注释掉的 WinWait 命令。
WinGetPos, , ,MSOutWidth,MSOutHeight,MasterSeeker 1.5.1 by DxCK
; WinGetPos 命令:获取 MasterSeeker 窗口的大小。
; 前两个参数留空(不关心 X 和 Y)。
; MSOutWidth 接收宽度,MSOutHeight 接收高度。
; 窗口匹配:标题包含 "MasterSeeker 1.5.1 by DxCK"。
;我不知道如何在Adventure v5.7.0或者SciTE4AutoHotkey中调试并查看变量的值,
; 注释:作者说明为什么用 ToolTip 来调试。
;所以在此处插入ToolTip语句用于显示变量的值,通过检查应用程序的窗口的宽度和高度从而判断窗口当前状态是否最小化。
; 注释:解释 ToolTip 调试方法。
;ToolTip,窗口宽度:%MSOutWidth% 窗口高度:%MSOutHeight%
; 被注释掉的 ToolTip 调试命令。
;电脑1默认窗口大小 左右W931,上下H449
; 注释:参考尺寸。
;电脑2默认窗口大小 左右W745,上下H358
; 注释:参考尺寸。
;电脑1调整后窗口大小 左右W950,上下H990
; 注释:参考尺寸。
;电脑2调整后窗口大小 左右W790,上下H810
; 注释:参考尺寸。
;MsgBox,%MSOutWidth%
; 被注释掉的 MsgBox 调试。
if (WinActive("MasterSeeker 1.5.1 by DxCK") and MSOutWidth>300)
; if 判断:MasterSeeker 窗口当前是激活状态,且窗口宽度大于 300 像素。说明窗口正常显示,应该隐藏它。
{
; if 代码块开始。
; ToolTip,"窗口宽度"%MSOutWidth%"大于500时最小化MasterSeeker窗口"
; 被注释掉的 ToolTip。
; WinHide,MasterSeeker 1.5.1 by DxCK
; 被注释掉的 WinHide。
WinMinimize,MasterSeeker 1.5.1 by DxCK
; WinMinimize 命令:最小化 MasterSeeker 窗口。
Go.Go()
; 调用 Go.Go() 无参数,结束子进程任务。
}
; if 代码块结束。
else
; 如果 MasterSeeker 没有正常显示(需要显示它):
{
; else 代码块开始。
; ToolTip,"窗口宽度"%MSOutWidth%"小于500时显示MasterSeeker窗口"
; 被注释掉的 ToolTip。
Process, Exist, MasterSeeker.exe
; Process 命令:检查名为 MasterSeeker.exe 的进程是否存在。结果存入 ErrorLevel 变量(非 0 表示存在,0 表示不存在)。
if ErrorLevel {
; if 判断:如果 ErrorLevel 非 0(即 MasterSeeker 进程正在运行)。
WinActivate,MasterSeeker 1.5.1 by DxCK
; WinActivate 命令:激活 MasterSeeker 窗口。
}
; if 代码块结束。
else
; 如果 MasterSeeker 进程不存在(需要启动它):
{
; else 代码块开始。
IfExist,%A_ScriptDir%\..\MasterSeeker\MasterSeeker.exe
; IfExist 命令:检查 MasterSeeker 程序文件是否存在。
{
; 如果存在:
Run,%A_ScriptDir%\..\MasterSeeker\MasterSeeker.exe
; Run 命令:启动 MasterSeeker。
}
; IfExist 代码块结束。
else
; 如果文件不存在:
{
; else 代码块开始。
MsgBox,0,,找不到文件 %A_ScriptDir%\..\MasterSeeker\MasterSeeker.exe,5
; MsgBox 命令:弹出消息框提示找不到文件,5 秒后自动关闭。
ExitApp
; 退出脚本。
}
; else 代码块结束。
}
; 外层 else 代码块结束。
WinShow,MasterSeeker 1.5.1 by DxCK
; WinShow 命令:显示 MasterSeeker 窗口(如果它是隐藏的)。
WinGet, WinMSID, ID,MasterSeeker 1.5.1 by DxCK
; WinGet 命令:获取 MasterSeeker 窗口的 ID(句柄),存入 WinMSID。
DllCall("SwitchToThisWindow", "UInt", WinMSID, "UInt", 1)
; DllCall 调用 SwitchToThisWindow API,把 MasterSeeker 窗口强制切换到前台。
loop,3000
; 循环最多 3000 次,尝试激活 MasterSeeker 窗口。
{
; 循环体开始。
WinActivate,MasterSeeker 1.5.1 by DxCK
; WinActivate 命令:激活 MasterSeeker 窗口。
IfWinActive,MasterSeeker 1.5.1 by DxCK
; IfWinActive 命令:检查 MasterSeeker 是否已经激活。
break
; 如果已激活,跳出循环。
Sleep,1
; 休眠 1 毫秒。
}
; 循环体结束。
; WinMove,ahk_class WindowsForms10.Window.8.app.0.218f99c,,0,0,A_ScreenWidth,A_ScreenHeight
; 被注释掉的 WinMove。
; WinMaximize,ahk_class WindowsForms10.Window.8.app.0.218f99c
; 被注释掉的 WinMaximize。
loop,3000
; 循环最多 3000 次,调整 MasterSeeker 窗口大小。
{
; 循环体开始。
WinMove,MasterSeeker 1.5.1 by DxCK,,A_ScreenWidth/2,20,A_ScreenWidth/2-10,A_ScreenHeight-90
; WinMove 命令:把 MasterSeeker 窗口移到右半屏。X=屏幕一半,Y=20,宽=屏幕一半-10,高=屏幕高-90。
; WinGetPos [, OutX, OutY, OutWidth, OutHeight, WinTitle, WinText, ExcludeTitle, ExcludeText]
; 被注释掉的行:是 WinGetPos 命令的语法说明。
WinGetPos,X,Y,W,H,MasterSeeker 1.5.1 by DxCK
; WinGetPos 命令:获取移动后的窗口位置,存入 X, Y, W, H。
;MsgBox %H%
; 被注释掉的 MsgBox 调试。
if ((A_ScreenHeight-90-H)<10)
; 判断:如果屏幕高度减 90 再减窗口高度 H 小于 10,说明窗口高度已经正确。
break
; 跳出循环。
Sleep,1
; 休眠 1 毫秒。
; 注意: MasterSeeker 的搜索框控件的名是 Filename ,很奇怪,很神奇,
; 注释:说明 MasterSeeker 搜索框的控件名。
; MasterSeeker 的搜索框控件不是类名 MasterSeeker 1.5.1 by DxCK7,也不是类名 Edit1
; 注释:说明控件名不是常见的 Edit1。
; ControlFocus,In Directory,MasterSeeker 1.5.1 by DxCK
; 被注释掉的 ControlFocus 示例。
; 设置输入焦点到窗口的指定控件上.
; 注释:说明下面代码的目的。
}
; 循环体结束。
; Sleep,100
; 被注释掉的 Sleep。
; ControlSend,Filename,{LControl Down}{LControl Down}{LControl Down}a{LControl Up},MasterSeeker 1.5.1 by DxCK
; 被注释掉的 ControlSend(发送 Ctrl+A 全选)。
; Send,{LControl Up}
; 被注释掉的 Send。
; Send,{LControl Up}
; 被注释掉的 Send。
loop,3000
; 循环最多 3000 次,尝试把焦点设置到 MasterSeeker 的搜索框。
{
; 循环体开始。
; 设置输入焦点到MasterSeeker窗口的Filename控件上(注意:此处编辑框的控件类名是Filename,不是Edit1)
; 注释:说明下面代码的目的。
; 并全选MasterSeeker的搜索关键字内容编辑框。
; 注释:说明目的。
ControlFocus,Filename,MasterSeeker 1.5.1 by DxCK
; ControlFocus 命令:把焦点设置到 MasterSeeker 窗口中名为 "Filename" 的控件上(这是搜索框)。
Sleep,100
; 休眠 100 毫秒,等待焦点切换完成。
ControlGetFocus, OutputVar,MasterSeeker 1.5.1 by DxCK
; ControlGetFocus 命令:获取当前拥有焦点的控件名,存入 OutputVar。
;MsgBox,%OutputVar%
; 被注释掉的 MsgBox 调试。
;类名判断太"硬编码"
; 注释:说明之前用固定类名判断的问题。
;WindowsForms10.Edit.app.0.xxxxx 里:
; 注释:解释 WinForms 控件类名的结构。
;218f99c1 / 134c08f 是 随机 AppDomain / 编译哈希
; 注释:解释类名的随机部分。
;_r6_ / _r8_ / _ad11 跟 .NET / Win10-11 / DPI 有关
; 注释:解释类名中的版本/DPI 部分。
;你每换一台机器/重装系统都可能失效。
; 注释:说明硬编码类名的问题。
; 只要把AutoHotkey脚本代码复制粘贴到元宝之后就能分析修复优化脚本代码
; 注释:提到 AI 辅助。
; 元宝 https://yuanbao.tencent.com/chat/
; 注释:元宝链接。
; 判断:只要是 WinForms 的 Edit 就行,不关心后面哈希
; 注释:说明改进思路。
;if ((OutputVar="WindowsForms10.Edit.app.0.218f99c1") or (OutputVar="WindowsForms10.Edit.app.0.134c08f_r6_ad11") or (OutputVar="WindowsForms10.Edit.app.0.134c08f_r6_ad11"))
; 被注释掉的旧代码:硬编码判断多个类名。
; 2026年7月 修改221行附近的代码,if ((OutputVar="WindowsForms10.Edit.app.0.218f99c1") or (OutputVar="WindowsForms10.Edit.app.0.134c08f_r6_ad11"))
; 注释:修改记录。
; 每种操作系统环境的MasterSeeker的搜索关键字编辑框控件的类名不同,这里只好把Windows 10 和Windows 11中不同的控件类名分别判断了
; 注释:解释为什么之前用多个 or 判断。
if (InStr(OutputVar, "WindowsForms10.Edit.app"))
; if 判断:用 InStr 函数检查 OutputVar 中是否包含子字符串 "WindowsForms10.Edit.app"。InStr 返回位置(>0 为 true),如果包含则说明焦点在 WinForms 的编辑框上。这样不依赖完整的随机哈希,兼容性更好。
break
; 如果焦点正确,跳出循环。
Sleep,1
; 休眠 1 毫秒。
}
; 循环体结束。
; 参数: start=0, end=-1 表示全选
; 注释:说明下面 SendMessage 参数的含义。
EM_SETSEL := 0xB1
; 给变量 EM_SETSEL 赋值为 0xB1。0xB1 是 Windows 消息 EM_SETSEL(选中编辑框文本)的十六进制值。用变量名使代码更易读。
loop,9
; 循环 9 次,尝试全选 MasterSeeker 搜索框中的文本。
{
; 循环体开始。
SendMessage, % EM_SETSEL, 0, -1, Filename,MasterSeeker 1.5.1 by DxCK
; SendMessage 命令:向 MasterSeeker 窗口的 Filename 控件发送 EM_SETSEL 消息。
; % EM_SETSEL 展开为 0xB1。
; 0 是起始位置,-1 是结束位置,表示全选所有文本。
Sleep,1
; 休眠 1 毫秒。
}
; 循环体结束。
loop,20
; 循环 9 次,尝试全选 MasterSeeker 搜索框中的文本。
{
; 循环体开始。
Send,{Up}
; 发送向上箭头键。
}
; 循环体结束。
; ControlSend,Filename,{Home}{ShiftDown}{ShiftDown}{End}{ShiftUp},MasterSeeker 1.5.1 by DxCK
; 被注释掉的 ControlSend 全选替代方案。
; ControlSend,Filename,{LControl Down}{LControl Down}{LControl Down}a{LControl Up},MasterSeeker 1.5.1 by DxCK
; 被注释掉的 ControlSend Ctrl+A 方案。
; Send,{LControl Up}
; 被注释掉的 Send。
Go.Go()
; 调用 Go.Go() 无参数,结束子进程任务,回到待命状态。
}
; ccc 函数结束。
}
; 注意:这个花括号实际上是脚本最末尾的。但在原始脚本中,ccc 函数最后的 } 已经结束了 ccc。这行如果有多余的花括号,可能是原始脚本格式问题。不影响执行(AutoHotkey 会忽略多余的 } 如果它不匹配任何 {)。
; 我的腾讯QQ电子邮箱地址是: 595076941@qq.com
; 纯注释行:作者的联系邮箱。
_Everything使用说明
Everything 是 Windows 下按文件名/路径毫秒级检索的工具(默认不搜文件内容),首次启动会自动索引本地 NTFS 分区。
一、安装与启动
1. 官网下载:
https://www.voidtools.com/forum/viewtopic.php?p=81104
https://www.voidtools.com/forum/viewtopic.php?t=9787&start=150
版本选择有索引文件正文内容功能的 V1.5.0.1415b 或者 V1.5.0.1415b 比较新或者比较旧的版本没有索引文件正文内容功能
(选安装版或便携版,语言选简体中文)。
2. 在DelayedStartupTool中设置C:\APP\Everything\Hotkey-F3.exe随系统自动启动并
设置Everything的快捷键为F3(F3键位于键盘最上面一行第4个键)。
二、文件名索引
工具→选项→索引→内容
content:abc 搜索内容包含有 abc 的文件。
content:<abc 123> 搜索内容包含 abc 和 123 的文件。
工具→选项→高级→设置项关键词搜索填写 pinyin
content:abc 搜索文件正文内容的拼音首字母包含有 abc 的文件。
content:<abc 123> 搜索文件正文内容的拼音首字母包含 abc 和 123 的文件。
本地固定卷走原生增量索引,其余走文件夹遍历索引。
1. 原生自动索引(毫秒级 + 实时更新)
靠文件系统日志(NTFS 用 USN Journal,ReFS 用类似机制)做增量,首次建库快、运行中实时跟着变:
NTFS(本地固定硬盘默认全收,U盘/移动硬盘里的 NTFS 卷需在 选项→索引→NTFS 勾"Include in database")
ReFS(Everything 1.5+ 支持,固定 ReFS 卷自动索引,可移卷同理手动勾选)
这两类才是 Everything "秒出结果、不卡磁盘" 的完全体体验。
2. 手动加索引(文件夹遍历,非实时)
FAT/exFAT 没有 USN Journal,Everything 退化为扫目录建快照,首次慢、更新靠轮询或定时重扫:
FAT / FAT32
exFAT(U盘、Mac/相机SD卡常见)
添加路径:工具 → 选项 → 索引 → 文件夹 → 添加,选盘符根目录或某个目录即可
更新策略:可开"尝试监视更改"(不完全可靠)、"定时重扫"、"缓冲区满重扫",或自己右键重扫
实测建议:常插的大容量移动硬盘,格成 NTFS 比 exFAT 体验好很多;临时 U 盘用文件夹索引就行。
3. 间接能搜(挂成 Windows 可见路径后走文件夹索引)
极空间私有云NAS》系统设置》自动挂载为磁盘
极空间私有云NAS》文件及共享服务》WebDAV》Windows电脑客户端 RaiDrive Ver 2019.12.22
网络盘:SMB 共享、\\server\share、映射盘符(Z: 等)——走文件夹索引,
不需要管理员权限,但别用"以管理员运行 Everything"否则看不见映射盘
光盘/离线介质:CD/DVD/BluRay 可用 File List(.efu)方式导入快照
EXT2/3/4(Linux 盘):Windows 不原生认,装 Ext2Fsd 或
WSL2 挂载出盘符后,当普通文件夹加进索引,能搜但慢
macOS APFS / HFS+:同理,需第三方驱动挂出 Windows 盘符再走文件夹索引,官方不直接支持
三、最基本用法
搜索框输入即出结果,不用回车:
report → 名字含 report 的文件/文件夹
*.pdf → 所有 PDF
2026 计划 → 空格=AND,同时含两词
"final report" → 精确短语(含空格整体)
结果操作:
双击 → 打开文件
Ctrl+Enter → 打开所在文件夹
Ctrl+C → 复制路径
Alt+P → 预览窗格
Ctrl+A → 全选
Esc → 关闭窗口
↑/↓ 选条目,Enter 打开
点击视图菜单》打钩选中筛选器》筛选器选择视频》按快捷键Ctrl+3按大小排序
点击工具菜单》选项Ctrl+P》常规》打钩选中"保存设置和数据到 %APPDATA%\Everything 目录"
(这样设置之后 C:\APP\Everything\Everything.ini 配置文件只有7行内容)
四、帮助菜单》搜索语法
操作符:
space 与 (AND)
| 或 (OR)
! 非 (NOT)
< > 分组
" " 搜索引号内的词组.
通配符:
* 匹配 0 个或多个字符.
? 匹配 1 个字符.
宏:
quot: 双引号 (")
apos: 单引号 (')
amp: 与号 (&)
lt: 小于 (<)
gt: 大于 (>)
#<n>: 十进制 Unicode 字符 <n>.
#x<n>: 十六进制 Unicode 字符 <n>.
audio: 搜索音频文件.
zip: 搜索压缩文件.
doc: 搜索文档文件.
exe: 搜索可执行文件.
pic: 搜索图片文件.
video: 搜索视频文件.
修饰符:
ascii: 启用快速 ASCII 大小写对比.
case: 区分大小写.
diacritics: 匹配变音标记.
file: 仅匹配文件.
folder: 仅匹配文件夹.
noascii: 禁用快速 ASCII 大小写对比.
nocase: 不区分大小写.
nodiacritics: 不匹配变音标记.
nofileonly: 仅不允许文件.
nofolderonly: 仅不允许文件夹.
nopath: 不匹配路径.
noregex: 禁用正则表达式.
nowfn: 不匹配完整文件名.
nowholefilename: 不匹配完整文件名.
nowholeword: 仅禁用全字匹配.
nowildcards: 禁用通配符.
noww: 仅禁用全字匹配.
path: 匹配路径和文件名.
regex: 启用正则表达式.
utf8: 禁用快速 ASCII 大小写对比.
wfn: 匹配完整文件名.
wholefilename: 匹配完整文件名.
wholeword: 仅匹配全字符.
wildcards: 启用通配符.
ww: 仅全字匹配.
函数:
album:<text> 搜索媒体专辑元数据.
ansicontent:<text> 搜索 ANSI 格式文本内容.
artist:<text> 搜索媒体艺术家元数据.
attrib:<attributes> 搜索指定的文件属性的文件和文件夹.
attribdupe: 搜索含有相同属性的文件和文件夹.
attributes:<attributes> 搜索指定的文件属性的文件和文件夹.
bitdepth:<bitdepth> 搜索指定像素密度的图片.
child:<filename> 搜索包含匹配文件名文件的文件夹.
childcount:<count> 搜索包含有指定数目子文件夹或文件的文件夹.
childfilecount:<count> 搜索包含有指定数目文件的文件夹.
childfoldercount:<n> 搜索包含有指定数目子文件的文件夹.
comment:<text> 搜索媒体注释元数据.
content:<text> 搜索文本内容.
count:<max> 指定搜索结果最大值.
dateaccessed:<date> 搜索指定访问时间的文件和文件夹.
datecreated:<date> 搜索指定创建日期的文件和文件夹.
datemodified:<date> 搜索指定修改日期的文件和文件夹.
daterun:<date> 搜索指定打开时间的文件和文件夹.
da:<date> 搜索指定访问时间的文件和文件夹.
dadupe: 搜索含有相同访问时间的文件和文件夹.
dc:<date> 搜索指定创建日期的文件和文件夹.
dcdupe: 搜索含有相同创建时间的文件和文件夹.
dimensions:<w>X<h> 搜索指定长宽的图片.
dm:<date> 搜索指定修改日期的文件和文件夹.
dmdupe: 搜索含有相同修改时间的文件和文件夹.
dr:<date> 搜索指定打开时间的文件和文件夹.
dupe: 搜索重复的文件名.
empty: 搜索空文件夹.
endwith:<text> 搜索以指定文本结尾的文件 (包含扩展名).
ext:<ext1;ext2;...> 搜索和列表中指定的扩展名匹配的文件 (扩展名以分号分隔).
filelist:<fn1|fn2|...> 搜索文件名列表中的文件.
filelistfilename:<name> 搜索文件名列表中的文件和文件夹.
frn:<frn> 搜索指定文件索引号的文件和文件夹.
fsi:<index> 搜索指定盘符索引中文件或文件夹 (索引 0 表示 C 盘, 以此类推).
genre:<text> 搜索媒体流派元数据.
height:<height> 搜索指定像素高度的图片.
infolder:<path> 搜索指定路径下的文件和文件夹 (不包含子文件夹).
len:<length> 搜索和指定的文件名长度相匹配的文件和文件夹.
namepartdupe: 搜索含有相同名称部分的文件和文件夹.
orientation:<type> 搜索指定方向的图片 (水平或竖直).
parent:<path> 搜索指定路径下的文件和文件夹 (不包含子文件夹).
parents:<count> 搜索有指定数目父文件夹的文件和文件夹.
rc:<date> 搜索指定最近修改日期的文件和文件夹.
recentchange:<date> 搜索指定最近修改日期的文件和文件夹.
root: 搜索没有父文件夹的文件和文件夹.
runcount:<count> 搜索指定打开次数的文件和文件夹.
shell:<name> 搜索已知的 Shell 文件夹名称, 包括子目录和文件.
size:<size> 搜索指定大小的文件 (以字节为单位).
sizedupe: 搜索大小重复的文件.
startwith:<text> 搜索指定文本开头的文件.
title:<text> 搜索媒体标题元数据.
track:<number> 搜索指定音轨号的媒体文件.
type:<type> 搜索指定的文件类型的文件和文件夹.
utf16content:<text> 搜索 UTF-16 格式文本内容.
utf16becontent:<text> 搜索 UTF-16 BE 格式文本内容.
utf8content:<text> 搜索 UTF-8 格式文本内容.
width:<width> 搜索指定像素宽度的图片.
函数语法:
function:value 等于某设定值.
function:<=value 小于等于某设定值.
function:<value 小于某设定值.
function:=value 等于某设定值.
function:>value 大于某设定值.
function:>=value 大于等于某设定值.
function:start..end 在起始值和终止值的范围内.
function:start-end 在起始值和终止值的范围内.
大小语法:
size[kb|mb|gb]
大小常数:
empty
tiny 0 KB < 大小 <= 10 KB
small 10 KB < 大小 <= 100 KB
medium 100 KB < 大小 <= 1 MB
large 1 MB < 大小 <= 16 MB
huge 16 MB < 大小 <= 128 MB
gigantic 大小 > 128 MB
unknown
日期语法:
year
month/year 或者 year/month 取决于本地设置
day/month/year, month/day/year 或者 year/month/day 取决于本地设置
YYYY[-MM[-DD[Thh[:mm[:ss[.sss]]]]]]
YYYYMM[DD[Thh[mm[ss[.sss]]]]]
日期常数:
today
yesterday
tomorrow
<last|past|prev|current|this|coming|next><year|month|week>
<last|past|prev|coming|next><x><years|months|weeks|days|hours|minutes|mins|seconds|secs>
january|february|march|april|may|june|july|august|september|october|november|december
jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec
sunday|monday|tuesday|wednesday|thursday|friday|saturday
sun|mon|tue|wed|thu|fri|sat
unknown
属性常数:
A 存档
C 压缩
D 目录
E 加密
H 隐藏
I 未索引的内容
L 重解析点
N 一般
O 离线
P 稀疏文件
R 只读
S 系统
T 临时
V 设备
五、通配符与逻辑
* 任意多字符:e*g、report*
? 单个字符:photo?.jpg、*.??(两字母扩展名)
| 或:.jpg|.bmp 或 *.jpg|*.png
! 排除:document !temp(含 document 不含 temp)
默认 AND,引号包住带空格的词
六、按属性/路径过滤(最高频)
扩展名:ext:docx、ext:jpg;png
类型:image:、video:、audio:、document:
大小:size:>2mb、size:<1mb、size:100kb..10mb
修改时间:dm:today、dm:yesterday、dm:2026-01-01、dc:lastweek(创建时间)
路径/目录:path:downloads、downloads\*.mp3、folder:D:\projects、C:\Users\*.txt
重复文件:dupe: 或 dupe:*.mp3
七、正则与高级
开正则:搜索 → 启用正则表达式(或 regex: 前缀),此时普通语法失效,用标准正则:^IMG_2026\d+\.jpg$、gray|grey
筛选器栏:搜索 → 筛选器(音频/视频/文档),可自己存常用条件
书签:存“搜索词+排序+筛选”组合,下次一键恢复
内容搜索:默认不搜内容;要搜内容需在选项里开“内容索引”(慢,慎用)
帮助》正则表达式语法:
a|b 匹配 a 或 b
gr(a|e)y 匹配 gray 或 grey
. 匹配任一字符
[abc] 匹配任一字符: a 或 b 或 c
[^abc] 匹配任一字符, 但不包括 a, b, c
[a-z] 匹配从 a 到 z 之间的任一字符
[a-zA-Z] 匹配从 a 到 z, 及从 A 到 Z 之间的任一字符
^ 匹配文件名的头部
$ 匹配文件名的尾部
( ) 匹配标记的子表达式
\n 匹配第 nth 个标记的子表达式, nth 代表 1 到 9
\b 匹配字词边界
* 匹配前一项内容 0 或多次
? 匹配前一项内容 0 或 1 次
+ 匹配前一项内容 1 或多次
*? 匹配前一项内容 0 或多次 (懒人模式)
+? 匹配前一项内容 1 或多次 (懒人模式)
{x} 匹配前一项内容 x 次
{x,} 匹配前一项内容 x 或多次
{x,y} 匹配前一项内容次数介于 x 和 y 之间
\ 特殊转义字符
工具→选项→索引→内容
content:abc 搜索内容包含有 abc 的文件。
content:<abc 123> 搜索内容包含 abc 和 123 的文件。
工具→选项→高级→设置项关键词搜索填写 pinyin
content:abc 搜索文件正文内容的拼音首字母包含有 abc 的文件。
content:<abc 123> 搜索文件正文内容的拼音首字母包含 abc 和 123 的文件。
八、搜不到时的排查
菜单 搜索 里 匹配大小写/整词/路径/变音/正则 是否误开 → 关掉
非 NTFS 盘(FAT32/exFAT/U盘/网盘)不会自动索引 → 工具→选项→文件夹 手动添加
刚删/刚建的文件没出来 → 右键托盘 强制重建索引,或确认 Everything 服务在跑
NTFS 盘别再手动加到“文件夹索引”,否则结果翻倍
九、帮助》命令行选项
Everything.exe [filename] [options]
filename 指定打开的文件列表.
-? 显示帮助.
-admin 以管理员身份运行 "Everything".
-admin-server-share-links 在 ETP 连接中使用 \\Server\C$ 的链接形式.
-app-data 保存数据到应用程序数据.
-bookmark <name> 打开指定的书签.
-case 启用大小写区分.
-choose-language 显示语言选择窗口.
-choose-volumes 禁用自动索引.
-close 关闭当前搜索窗口.
-config <filename> 指定 ini 文件的文件名.
-connect <user:pass@host:port> 连接 ETP 服务器.
-console 显示调试控制台.
-copyto <filename1> <...> 显示使用指定文件名的多文件重命名工具.
-create-file-list <filename> <path> 创建一个路径的文件列表.
-create-file-list-exclude-files <list> 排除匹配筛选器的文件, 筛选器用分号分隔.
-create-file-list-exclude-folders <list> 排除匹配筛选器的文件夹, 筛选器用分号分隔.
-create-file-list-include-only-files <list> 仅包含匹配筛选器的文件, 筛选器用分号分隔.
-create-usn-journal <volume> <max-size-bytes> <allocation-delta-bytes>
-db <filename> 指定数据库的文件名.
-debug 显示调试控制台.
-debug-log 记录调试信息到本地硬盘.
-delete-usn-journal <volume> 删除 USN 日志.
-details 以详情视图显示结果.
-diacritics 启用变音符匹配.
-disable-run-as-admin 禁用以管理员身份运行.
-disable-update-notification 禁用程序打开时更新通知.
-drive-links 在 ETP 连接中使用 C: 的链接形式.
-edit <filename> 用文件列表编辑器打开文件列表.
-enable-run-as-admin 启用以管理员身份运行.
-enable-update-notification 启用程序打开时更新通知.
-exit 退出 "Everything".
-first-instance 仅当此为 "Everything" 第一个实例时运行.
-filelist <filename> 打开指定的文件列表.
-filename <filename> 搜索指定文件名的文件和文件夹.
-filter <name> 选择指定的搜索筛选器.
-focus-bottom-result 聚焦到底部结果.
-focus-last-run-result 聚焦到上次运行结果.
-focus-most-run-result 聚焦到最常运行结果.
-focus-results 聚焦到结果列表.
-focus-top-result 聚焦到顶部结果.
-ftp-links 在 ETP 连接中使用 ftp://host/C: 的链接形式.
-fullscreen 全屏显示搜索窗口.
-h 显示帮助.
-help 显示帮助.
-home 打开搜索首页.
-install <location> 安装 "Everything" 到指定路径.
-install-client-service 安装 "Everything" 客户服务.
-install-config <filename> 安装指定 ini 文件.
-install-desktop-shortcut 创建桌面快捷方式.
-install-efu-association 关联 EFU 文件.
-install-folder-context-menu 安装文件夹右键菜单.
-install-quick-launch-shortcut 添加到快速启动栏.
-install-run-on-system-startup 添加 "Everything" 到启动项.
-install-service 安装并开启 "Everything" 服务.
-install-service-pipe-name <name> 指定 "Everything" 服务管道名称.
-install-service-security-descriptor 指定管道安全描述.
-install-start-menu-shortcuts 添加 "Everything" 到开始菜单.
-install-url-protocol 安装 URL 协议.
-instance <name> 指定 "Everything" 的实例名.
-l 载入本地数据库.
-language <langID> 指定语言代码以变更界面语言.
-load-delay <milliseconds> 载入数据库之前, 指定以毫秒为单位的延迟.
-local 载入本地数据库.
-matchpath 启用完整路径匹配.
-maximized 最大化搜索窗口.
-minimized 最小化搜索窗口.
-moveto <filename1> <...> 显示使用指定文件名的多文件重命名工具.
-name-part <filename> 搜索文件部分文件名.
-newwindow 新建搜索窗口.
-noapp-data 保存数据到应用程序路径.
-nocase 禁用大小写区分.
-nodb 不保存或载入 "Everything" 数据库.
-nodiacritics 禁用变音符匹配.
-nofullscreen 窗口化显示搜索窗口.
-nomatchpath 禁用完整路径匹配.
-nomaximized 非最大化搜索窗口.
-nominimized 非最小化搜索窗口.
-nonewwindow 显示存在的搜索窗口.
-noontop 禁用总在最前.
-noregex 禁用正则表达式.
-noverbose 显示基本调制信息.
-nowholeword 禁用全字匹配.
-noww 禁用全字匹配.
-ontop 启用总在最前.
-p <path> 搜索指定的路径.
-parent <path> 搜索指定文件夹中的文件和子文件夹.
-parentpath <path> 搜索指定的父目录.
-path <path> 搜索指定的路径.
-quit 退出 "Everything".
-read-only 以只读模式载入数据库.
-regex 使用正则表达式.
-reindex 强制重建数据库.
-rename <filename1> <...> 显示使用指定文件名的多文件重命名工具.
-s <text> 搜索指定文本.
-search <text> 搜索指定文本.
-searchfilelist <filename> 在指定的文本搜索列表中的文件名.
-select <filename> 聚焦且选定指定结果.
-server-share-links 在 ETP 连接中使用 \\Server\C: 的链接形式.
-service-pipe-name <name> 链接到指定名称的安全管道.
-sort <name> 以指定名称排列.
-sort-ascending 升序排列.
-sort-descending 降序排列.
-start-client-service 开启 "Everything" 客户服务.
-start-service 开启 "Everything" 服务.
-startup 后台运行 "Everything".
-stop-client-service 停止 "Everything" 客户服务.
-stop-service 停止 "Everything" 服务.
-svc 以服务形式运行 "Everything".
-svc-pipe-name <name> 启用指定名称的管道服务器.
-svc-security-descriptor <sd> 启用指定安全描述的管道服务器.
-thumbnail-size <size> 指定图标大小.
-thumbnails 以图标视图显示结果.
-toggle-window 隐藏或显示前台搜索窗口.
-uninstall [path] 指定 "Everything" 路径来卸载.
-uninstall-client-service 移除 "Everything" 客户服务.
-uninstall-desktop-shortcut 移除桌面快捷方式.
-uninstall-efu-association 移除 EFU 文件关联.
-uninstall-folder-context-menu 移除文件夹右键菜单.
-uninstall-quick-launch-shortcut 从快速启动栏移除.
-uninstall-run-on-system-startup 移除 "Everything" 启动项.
-uninstall-service 移除 "Everything" 服务.
-uninstall-start-menu-shortcuts 从开始菜单中移除 "Everything" .
-uninstall-url-protocol 卸载 URL 协议.
-uninstall-user 移除用户文件.
-update 更新数据库.
-url <[es:]search> 搜索指定链接 ES: URL.
-verbose 显示所有调试信息.
-wholeword 启用全字匹配.
-ww 启用全字符匹配.
十、常见问题
https://www.voidtools.com/zh-cn/faq/
常见问题
Everything
"Everything" 是什么?
"Everything" 索引全部文件需要多长时间?
"Everything" 能否搜索文件内容?
"Everything" 是否占用很多系统资源?
"Everything" 能否监控文件系统变更?
"Everything" 免费么?
"Everything" 是否包含恶意、间谍软件或广告?
"Everything" 在非运行时是否会丢失文件系统变更?
"Everything" 的系统要求是什么?
怎么样转换分卷为 NTFS?
"Everything" 能否可以索引映射的网络分区?
如何安装 "Everything"?
如何使用 "Everything"?
为何 "Everything" 1.4 比 1.3 占用更多内存?
如何在运行 "Everything" 时屏蔽 UAC 警告?
搜索
如何搜索文件或文件夹?
如何使用布尔运算符?
如何使用通配符?
如何搜索包含空格的关键词?
如何搜索文件类型?
如何搜索指定位置的文件和文件夹?
高级搜索
疑难解答
搜索结果不对
设置未保存
结果重复
搜索结果为空或仅包含分区
Everything
"Everything" 是什么?
"Everything" 是 Windows 上一款搜索引擎,它能够基于文件名快速定文件和文件夹位置。
不像 Windows 内置搜索,"Everything" 默认显示电脑上每个文件和文件夹 (就如其名 "Everything")。
您在搜索框输入的关键词将会筛选显示的文件和文件夹。
"Everything" 索引全部文件需要多长时间?
"Everything" 仅索引文件和文件夹名,一般仅需几秒便可建立其数据库。
全新安装的 Windows 10 (大约 120,000 个文件) 仅需 1 秒即可索引完成。
索引 1,000,000 个文件将需要大约 1 分钟。
"Everything" 能否搜索文件内容?
可以,"Everything" 可以通过搜索函数 content: 来搜索文件内容。
文件内容未被索引时,搜索内容将会很慢。
"Everything" 是否占用很多系统资源?
不,"Everything" 仅需要使用非常少的系统资源。
全新安装的 Windows 10 (大约 120,000 个文件) 仅需要大约 14 MB 的内存以及不到 9 MB 的硬盘空间。
1,000,000 个文件需要大约 75 MB 的内存和 45 MB 的硬盘空间。
"Everything" 能否监控文件系统变更?
可以,"Everything" 可以监控文件系统变更。
搜索结果就可以反映出文件系统变更。
"Everything" 免费么?
免费,"Everything" 是一款免费软件。
软件开发维护不易,请考虑捐赠。
"Everything" 是否包含恶意、间谍软件或广告?
完全没有,"Everything" 不包含任何恶意、间谍软件或广告。
"Everything" 在非运行时是否会丢失文件系统变更?
不会,"Everything" 在关闭和重新打开中不会丢失文件系统变更 (甚至系统重启也不会)。
"Everything" 将在启动后更新数据库。
"Everything" 的系统要求是什么?
"Everything" 能在 Windows XP、Vista、Windows 7、Windows 8 和 Windows 10 上运行。
NTFS 索引功能需要 Everything 服务或用管理员方式打开 "Everything"。
怎么样转换分卷为 NTFS?
转换分卷为 NTFS前,请务必备份好任何重要资料。
分卷一旦转换为 NTFS,它将无法转换回 FAT 或 FAT32。
请注意,某些系统可能无法读取 U 盘或 USB 中 NTFS 分卷。
转换分卷为 NTFS:
开始菜单,点击运行。
输入以下内容并点击确定:
cmd
在命令提示符中,输入以下内容并点击确定:
convert D: /fs:ntfs
其中 D: 是待转换分区。
"Everything" 能否可以索引映射的网络分区?
可以,请查阅文件夹索引以获取更多信息。
如何安装 "Everything"?
请查阅 "Everything" 基础安装指南。
如何使用 "Everything"?
请查阅 "Everything" 基础使用指南。
为何 "Everything" 1.4 比 1.3 占用更多内存?
"Everything" 1.4 默认索引了文件大小和日期并存储了额外信息以便更快排序。
请查阅最小内存优化以禁用这些变更。
如何在运行 "Everything" 时屏蔽 UAC 警告?
"Everything" 需要管理员权限以便低级别读取 NTFS 分卷来 NTFS 索引。
UAC 警告可以通过以标准用户运行 "Everything" 和安装 "Everything" 服务或不使用 NTFS 索引来避免。
以标准用户运行 "Everything" 和安装 "Everything" 服务:
在 "Everything" 中,打开工具菜单,点击选项。
点击常规页面。
检查 Everything 服务。
取消以管理员方式运行。
点击确定。
退出 "Everything" (右键 Everything 托盘图标并点击退出)。
重启 Everything。
搜索
如何搜索文件或文件夹?
在搜索框中输入文件或文件夹部分名称,搜索结果将会立即出现。
如何使用布尔运算符?
AND 是默认布尔运算符。
例如,搜索 abc 和 123,您可以:
abc 123
搜索两个搜索项中任意一个,在两项中加上 | 。
例如,搜索 .jpg 或 .bmp,您可以:
.jpg | .bmp
搜索时排除某项,在其开头加上 ! 。
例如,搜索除了 abc 以外的内容,您可以:
!abc
查看 Everything 基础搜索语法:
在 "Everything" 中,打开帮助菜单,点击搜索语法。
如何使用通配符?
搜索关键词中使用通配符 * 将会匹配任意数量的任意字符。
例如,搜索以 e 开头并以 g 结尾的文件和文件夹:e*g
搜索关键词中使用通配符 ? 将会匹配任一字符。
例如,搜索含有两个字符扩展名的文件:*.??
如何搜索包含空格的关键词?
搜索包含空格的关键词,请用双引号。
例如,搜索关键词 foo<space>bar:"foo bar"
如何搜索文件类型?
搜索文件类型,请在搜索框输入扩展名,
例如,搜索 mp3 文件,输入 *.mp3 即可。
搜索多个文件类型,请使用 | 分隔,
例如:*.bmp|*.jpg 将会搜索 bmp 或 jpg 类型文件。
如何搜索指定位置的文件和文件夹?
搜索指定位置的文件和文件夹,请在搜索框中使用 \。
例如,在 downloads 文件夹中搜索全部 mp3 文件:downloads\ .mp3
您也可以在搜索菜单中启用匹配路径并包含路径到搜索关键词中。
例如,启用匹配路径并在 downloads 文件夹中搜索全部 avi 文件:downloads .avi
高级搜索
查阅 Everything 帮助以获取更多信息。
疑难解答
搜索结果不对
请确认以下搜索选项未选择:
在 Everything 中,打开搜索菜单:
取消大小写匹配。
取消全字匹配。
取消匹配路径。
取消匹配变音标记。
取消启用正则表达式。
请确认 Everything 筛选器:
在 Everything 中,打开搜索菜单:
检查 Everything。
设置未保存
请确认已启用保存设置和数据到 %APPDATA%\Everything。
启用保存设置和数据到 %APPDATA%\Everything:
在 Everything 中,打开工具菜单,点击选项。
点击常规页面。
点击保存设置和数据到 %APPDATA%\Everything。
点击确定。
结果重复
"Everything" 已自动索引 NTFS 分卷。
添加 NTFS 分卷作为文件夹索引将会导致搜索结果重复。
移除作为文件夹索引的 NTFS 分卷:
在 Everything 中,打开工具菜单,点击选项。
点击文件夹页面
选择 NTFS 分卷并点击移除。
点击确定。
检查 NTFS 分卷是否被自动索引:
在 Everything 中,打开工具菜单,点击选项。
点击 NTFS 页面。
数据库中 NTFS 分卷必定包含在 NTFS 索引中。
搜索结果为空或仅包含分区
请确认 "Everything" 服务已运行或 "Everything" 以管理员身份运行。
安装 "Everything" 服务:
在 Everything 中,打开工具菜单,点击选项。
点击常规页面。
点击 Everything 服务:
点击确定。
-或-
以管理员身份运行 Everything:
在 Everything 中,打开工具菜单,点击选项。
点击常规页面。
点击管理员身份运行:
点击确定。
请确认您拥有至少一个本地 NTFS 分卷。
请查阅转换分卷为 NTFS。
手动启用索引全部本地 NTFS 分卷:
在 Everything 中,打开工具菜单,点击选项。
点击 NTFS 页面。
分卷列表中的本地 NTFS 分卷:
检查包含到数据库。
检查启用 USN 日志记录。
检查监控变更。
点击确定。
强制 Everything 重建数据库:
在 Everything 中,打开工具菜单,点击选项。
点击索引页面。
点击强制重建。
点击确定。
十一、 "Everything" 基础安装指南。
https://www.voidtools.com/zh-cn/support/everything/installing_everything/
安装 Everything
Everything 可以通过安装包安装或以便携版运行。
Everything 安装包和便携版可以在下载页面下载。
Everything 应该下载什么版本?
版本 说明
安装版 安装版将指导用户安装 (推荐)。安装版中 Everything.exe 与便携版中一致。
便携版 用户必须解压 Everything.exe 到指定路径,且不会更改系统。大部分安装版中选项都在便携版 Everything 选项中可用。
x86 Everything x86 版本仅支持 x86 上下文扩展菜单。此版本同时可以工作于 Windows x86 和 x64 平台。
x64 Everything x64 版本需要 64 位 x64 操作系统。支持大于 2GB 的数据库。Everything x64 版本仅支持 x64 上下文扩展菜单,且要比 x86 版本使用更多内存。
English (US) 英文版,可以手动安装语言包。
多语言版 包含 Everything 语言包以提供多语言支持。
Lite 此简易版本不包含 ETP/FTP/HTTP servers ,并且不允许 IPC.
语言选择
Everything Installer Language
选择安装向导语言,此语言亦将适用于 Everything 界面语言。
查阅多语言支持以获取支持语言列表。
许可协议
Everything Installer License Agreement
您必须同意许可协议才可以继续安装 Everything。
您可以此处找到许可协议的副本。
安装位置
Everything Installer Install Location
选择 Everything 安装位置。
Everything 默认安装到:
C:\Program Files\Everything
如果安装 x86 版本 "Everything" 到 x64 OS:
c:\Program Files (x86)\Everything
设置和数据存储位置
Everything Installer Install Options 1
选择设置和数据存储位置。
推荐 %APPDATA%\Everything。
此设置可以在 Everything 选项中更改。
索引 NTFS 分卷
选择索引 NTFS 分卷方式:
方式 说明
安装 Everything 服务 安装 Everything 服务将允许 Everything 以低级别权限获取 NTFS 索引。此服务以必须权限运行,Everything 可以以普通账户运行。
以管理员身份运行 以管理员身份运行 Everything。
不索引 NTFS Everything 不将索引 NTFS 分卷。
此设置可以在 Everything 选项中更改。
安装选项
Everything Installer Install Options 2
选项 说明
检查更新 启用后,运行 Everything 时,连接 www.voidtools.com 以检查更新。
开机自动启动 Everything 开机自动启动 Everything。此操作将加载 Everything 数据库到内存并创建 Everything 托盘图标。
集成到资源管理器上下文菜单 集成上下文菜单 "Search Everything..." 到 Windows 资源管理器。点击此上下文菜单将以此选定文件夹打开 Everything 搜索窗口。
添加 Everything 到开始菜单 创建搜索 Everything 和卸载 Everything 快捷方式到开始菜单。
创建 Everything 桌面快捷方式 创建搜索 Everything 桌面快捷方式。
添加 Everything 到快速启动栏 创建搜索 Everything 快捷方式到快速启动栏。
安装 URL 协议 允许通过 es: urls 打开 Everything。
关联 EFU 文件到 Everything 关联 Everything 文件列表 (EFU 文件) 到 Everything。
自动索引 NTFS 固定卷 启用后,Everything 将自动添加所有 NTFS 分卷到索引。禁用此项以手动添加。
此设置可以在 Everything 选项中更改。
UAC
Everything Installer UAC
Everything 安装需要管理员权限。
点击 Yes 继续以管理员权限安装。
完成
Everything Installer Finish
Everything 安装完成。点击完成以启动 Everything。
当Everything启动时,它将花费数秒来创建初始索引。
Everything 基础使用指南,请查阅使用 Everything。
疑难解答
错误 说明
OS 不是 x64
是否继续安装? 如果安装 x64 版本 Everything 到 32 位 OS,则将出现此错误。请确认您使用正确的 x86 或 x64 版本的 Everything (查阅 Everything 应该下载什么版本?)。
执行管理员命令失败 安装向导以管理员身份运行 Everything 并更改系统配置失败。请确认 Everything 能以管理员身份运行。
执行用户命令失败 安装向导运行 Everything 并配置选项失败。此情况一般因为反病毒软件造成。请确认安装向导能够从临时目录执行 Everything。
更多请查阅
使用 Everything
选项
卸载 Everything
十二、"Everything" 基础使用指南。
https://www.voidtools.com/zh-cn/support/everything/using_everything/
使用 Everything
Everything 首次启动时,将创建所有本地 NTFS 分卷索引。
创建全部索引将花费数秒。
一旦索引完毕,您的所有文件都会显示在 Everything 中。
在搜索框中输入部分文件夹以进行搜索。
Everything Search Window
Everything 搜索窗口包含以下部分:
菜单
菜单栏包括有 Everything 搜索窗口的各种命令, 结果、视图、书签、工具以及帮助。
搜索框
输入部分文件名以定位文件或文件夹。
使用搜索菜单中高级搜索以执行复杂搜索操作。
查阅搜索中完整搜索语法。
基础搜索语法可以通过 Everything 帮助菜单查看。
结果列表标头
点击分栏标头以排序此分栏结果。点击统一分栏标头以更改排序。
右键点击分栏标头以自定义分栏显示。
结果列表
双击或单击并按 Enter 以打开选定项。
选定项可以拖拽到其他程序。
右键点击选定项可以打开上下文菜单。
查阅结果以获取更多信息。
状态栏
显示 Everything 当前状态和当前搜索选项。
右键点击状态栏以更改搜索选项。
双击某搜索选项以禁用。
显示 Everything 搜索窗口
显示 Everything 搜索窗口:
双击 Everything 托盘图标。
-或-
使用快捷键。
-或-
从快捷方式打开 Everything,例如 Everything 桌面快捷方式、Everything 开始菜单快捷方式或 Everything 快速启动栏快捷方式。
一般情况下,Everything 仅会显示一个搜索窗口。
启用从托盘图标创建新的搜索窗口和/或 Everything 运行时创建创建新的搜索窗口以使用多搜索窗口。
查找最近修改的文件和监控系统实时变更
例如,查找今天修改的文件和文件夹:
dm:today
右键点击结果列表空白处并点击排序->修改时间以查看系统实时变更。
打开经常运行文件
Everything 记忆每次结果的运行次数。
在搜索框中按 Enter 已选择最高运行次数的结果。
右键点击一个文件或文件夹以手动设置运行次数。
查阅运行历史以获取更多信息。
以运行次数排序,右键点击列表空白处并点击排序->运行次数。
导出结果
搜索结果导出为 CSV、TXT 或 EFU 格式文件。
导出搜索结果:
在 "Everything" 中,打开文件菜单,点击导出...。
筛选器
筛选器是预定义的搜索选项,例如音频和视频文件类型。
点击搜索菜单中筛选器已选择一个筛选器。选定的筛选器将显示在状态栏。双击状态栏中此筛选器已禁用。
点击视图菜单中筛选器以显示筛选器栏。
查阅自定义筛选器以获取更多信息。
书签
保存当前搜索、筛选器,排序方式和索引以便后续快速恢复。
查阅书签以获取更多信息。
从网络浏览器访问 Everything
您可以在 Everything 启用网络服务器以从手机或其他设备访问您的文件。
查阅 HTTP 服务器以获取更多信息。
从其他电脑访问 Everything
您可以在 Everything 启用 ETP 服务器以从其他电脑访问您的文件。
查阅 ETP 服务器以获取更多信息。
更改字体和颜色
结果列表字体和颜色可以通过 Everything 选项自定义。
查阅 Everything.ini 以了解如何自定义字体和颜色。
外部文件管理器
查阅外部文件管理器以了解如何用自定义文件管理器打开文件。
键盘快捷键
查阅键盘快捷键以获取存在键盘快捷键列表。
查阅自定义键盘快捷键以获取更多信息。
索引
包含本地 NTFS 分卷,任何文件夹和/或文件都索引到列表中。
查阅索引以获取更多信息。
文件列表
创建一个在 NAS、CD、DVD 或 BluRay 上文件的快照并包含到索引。
打开工具菜单,点击文件列表编辑器以显示内置列表编辑器。
查阅文件列表以获取更多信息。
选项
自定义 Everything 安装位置、用户界面、首页搜索、搜索设置、搜索结果显示、右键菜单、字体和颜色、键盘快捷键、搜索和运行历史、NTFS 分卷、文件夹索引、文件列表、排除文件夹和文件类型、ETP 和 HTTP 服务器。
查阅选项以获取更多信息。
退出 Everything
当您关闭 Everything 搜索窗口后,Everything 仍继续在后台运行。
打开文件菜单,点击退出或右键点击 Everything 托盘图标并点击退出以完全退出 Everything。
关闭 Everything 搜索窗口同时退出 Everything:
在 "Everything" 中,打开工具菜单,点击选项。
点击界面页面。
取消选择后台运行。
点击确定。
更多请查阅
搜索
结果
索引
Search Syntax
An Everything search consists of one or more search terms joined by search operators.
Requires Everything 1.5
Syntax
Operators
Wildcards
Macros
Character Entities
Filename Parts
See also
Syntax
A search term specifies what to search.
The basic structure of a single search term is:
[!][search-modifier:][search-function:]<text>
[!]
Optional NOT operator to exclude the search term.
[search-modifier:]
Optional search modifiers.
Multiple search modifiers may be specified to change how the search term is matched.
Search modifiers override default settings in the Search menu, allowing you to temporarily enable or disable matching options.
[search-function:]
Optional search function to search a specific property, such as a date or size.
<text>
Search text or a value interpreted by the search function.
Literal text without a search function matches file and folder names.
If Match Path is enabled in the Search menu, literal text matches against the full path instead.
For example:
abc = matches filenames containing abc
path:abc = matches full paths containing abc
date-modified:today = matches files and folders modified today
case:extension:JPG = matches files with an extension containing uppercase JPG
!abc = excludes filenames containing abc
Search terms can be combined with search operators to create more complex search expressions.
<search-term> <operator> <search-term> ...
For example:
abc 123 = matches filenames containing both abc AND 123
*.jpg | *.png = matches files with a jpg OR png extension
Operators
Operators combine search terms and control how they are evaluated.
space
AND search terms together.
For example:
abc 123 = matches abc AND 123
|
OR search terms together.
Spaces immediately before or after | are ignored.
For example:
abc|123 = matches abc OR 123
abc | 123 = matches abc OR 123
!
NOT a search term.
The search term that follows is excluded.
For example:
!abc = matches NOT abc
< >
Group search terms together to change the evaluation order.
For example:
!<abc 123> = matches NOT (abc AND 123)
" "
Quote search text.
Treats everything inside the quotes as plain text.
Operators inside quotes are ignored.
For example:
"C:\Program Files" = matches the text: C:\Program Files
By default, OR is evaluated before AND.
For example:
apple banana | orange = matches apple AND (banana OR orange)
Use grouping < > to change the evaluation order.
For example:
<apple banana> | orange = matches (apple AND banana) OR orange
Operator precedence can be changed in the Search Options.
Wildcards
* Matches zero or more characters (except \)
** Matches zero or more characters
? Matches one character (except \)
The whole filename is matched when using wildcards.
For example:
*.mp3 = matches mp3 files
foo* = matches filenames starting with foo
*foo* = matches filenames containing foo
stem:*bar = matches filenames ending with bar (ignoring extension)
Macros
audio: Matches audio files.
zip: Matches compressed files.
doc: Matches document files.
exe: Matches executable files.
image: Matches image files.
video: Matches video files.
For example:
audio: = matches audio files
audio:|video: = matches audio or video files
Character Entities
&sp: Literal space ( )
&vert: Literal vertical line (|)
&excl: Literal exclamation mark (!)
<: Literal less than (<)
>: Literal greater than (>)
": Literal double quote (")
&#<n>: Literal Unicode character <n> in decimal.
&#x<n>: Literal Unicode character <n> in hexadecimal.
For example:
C:\Program&sp:Files = match files/folders in C:\Program files
&excl:readme.txt = match filenames containing !readme.txt
content:":foo": = match file content containing "foo"
diacritics:­: = match filenames containing a soft hyphen (-)
Character Entities
Filename parts
Full Path C:\folder\file.txt
Name file.txt
Path C:\folder
Stem file
Extension txt
See also
Search Modifiers
Search Functions
operator_precedence
Search Modifiers
Search modifiers control how search terms are parsed and matched.
They can be used to enable features such as case-sensitive matching, whole-word matching, regular expressions, full path matching and many other search behaviors.
If no search modifier is specified, Everything performs a partial filename match based on the current search settings.
Requires Everything 1.5
Syntax
Text matching
Files and folders
Filename and property value matching
Content matching
Search mode
Result management
Search parsing
Filters and bookmarks
All modifiers
See also
Syntax
A search term specifies what to search.
The basic structure of a single search term is:
[search-modifier:][search-function:]<text>
[search-modifier:]
Optional search modifiers.
Multiple search modifiers may be specified to change how the search term is matched.
Search modifiers override default settings in the Search menu, allowing you to temporarily enable or disable matching options.
[search-function:]
Optional search function to search a specific property, such as a date or size.
<text>
Search text or a value interpreted by the search function.
Literal text without a search function matches file and folder names.
If Match Path is enabled in the Search menu, literal text matches against the full path instead.
Examples:
case:ABC = filenames matching case-sensitive ABC
len:album:>20 = files where the album length is greater than 20
regex:^foo = filenames starting with foo
regex:content:^foo = files with content starting with foo
case:wholewords:path:FOO = full paths matching case-sensitive whole word FOO
Search modifiers can be disabled by prefixing them with: no-
For example, if Match Path is enabled under the Search menu, use no-path: to disable full path matching:
no-path:abc
Prefix a search modifier with ? to enable it for the rest of the search.
The search modifier does not need to be attached to a term.
For example, to enable case-sensitive matching for the rest of the search:
?case: FOO BAR is the same as case:FOO case:BAR
Use a * suffix on a search modifier to treat the rest of the search as literal text.
No further parsing is performed.
For example, to treat the rest of the search as literal text with regex:
regex*:^foo bar$
Prefix a search modifier with :: to use the built-in modifier, bypassing user-defined overrides.
For example, to refer to the built-in case search modifier:
::case:
Search modifiers can be applied to < > groups.
For example:
case:<FOO BAR>
Hyphens (-) in search modifiers can be omitted.
For example:
no-whole-words: is the same as nowholewords:
Text matching
Controls how text comparisons are performed.
case:
diacritics:
ignore-punctuation:
ignore-whitespace:
Files and folders
Controls which item types are matched.
file:
folder:
Filename and property value matching
Controls how filenames and property values are matched.
path:
prefix:
suffix:
whole:
whole-words:
start-with:
end-with:
multi-string:
all-strings:
Content matching
Controls how file content is searched.
each-line:
binary:
hex:
Search mode
Controls the search behavior.
regex:
len:
wildcards:
pinyin:
soundex:
to-string:
to-integer:
to-number:
Result management
Controls how results are filtered and displayed.
enable-result-omissions:
disable-result-omissions:
enable-temp-result-omissions:
disable-temp-result-omissions:
no-highlight:
Search parsing
Controls how the search is parsed.
and-precedence:
or-precedence:
no-!:
no-reorder:
search-current-results:
Filters and bookmarks
Controls filter and bookmark behavior.
and-filter:
or-filter:
menu-break:
menu-separator:
All Modifiers
all-strings:
Match all strings in a multi-string value.
For example:
all-strings:author:john;"jane doe"
Default: match any string value.
and-filter:
Use in a filter search.
AND this filter when multiple filters are selected.
For example:
and-filter: d:|e:
and-filter: !c:\windows\
Default: OR multiple filters.
See also: or-filter:
and-precedence:
Makes AND evaluate before OR when parsing search expressions.
For example:
?and-precedence: sonic tails | mario luigi => (sonic tails) | (mario luigi)
Default: OR > AND. (see Tools -> Options -> Search -> Operator precedence setting)
See also: ?or-precedence:
binary:
Treat the search and file content as a byte stream.
For example:
binary:content:\x00\x00\x01\x10
binary:content:abc123
ASCII text is supported.
Use \x00 - \xff to specify a byte value in hex.
Default: Disabled.
case:
no-case:
Enables or disables case-sensitive matching.
For example:
case:WINDOWS
no-case:WINDOWS
Default: Disabled. (see the Match Case setting under the Search menu)
diacritics:
no-diacritics:
Match or ignore accent marks.
For example:
diacritics:"Déjà Vu"
no-diacritics:"Deja Vu"
Aliases: diac:
Default: Disabled. (see the Match Diacritics setting under the Search menu)
dot-all:
When enabled, regular expression . will match all characters.
When disabled, regular expression . will match all characters except new lines.
For example:
dotall:regex:content:"line 1.*line 2"
regex:content:"(?s)line 1.*line 2"
Default: Disabled.
See also: regex:
each-line:
Match each line or match the entire content.
If enabled, searching stops on the first line matched.
For example:
eachline:content:<a b> (find a and b on the same line)
eachline:content:<a b c d|e|f !g !h !i>
Default: Disabled. (match the entire content)
end-with:
Match the end of filenames.
For example:
endwith:hosts
Aliases: $:
Default: Disabled.
no-fast-regex:
Disable regex optimization.
Regex optimizations will need to be disabled if you would like to use the regex match 0 property without using a special character in your regex pattern.
For example:
no-fast-regex:regex:abc123 regexmatch0:123
Default: Enabled.
file:
folder:
Match files or folders only.
For example:
folder:music
file: .mp3
Aliases: files-only: folders-only:
Default: Match files and folders.
global:
When enabled, find all occurrences of the regular expression.
When disabled, find only the first occurrence.
If no group capture is specified, the entire match is captured.
For example:
global:regex:\d+
Default: Disabled.
See also: regex:
hex:
Convert 2 character hex codes into a single byte and treats the search and file content as a byte stream.
For example:
hex:48656C6C6F
hex:startwith:content:89504E47 = matches PNG file signatures
Default: Disabled.
hex-to-number:
Compare a filename or property value in hex as an integer.
For example:
hex-to-number:0x1000..0x2000
Default: Disabled.
no-highlight:
Disable highlighting for this term.
For example:
no-highlight:path:foo
Default: Highlight the search term.
from-disk:
Search properties and content from disk (not from the index).
For example:
fromdisk:length:>5m
Default: Search indexed properties only. If the property is not included in the index, search the property from disk.
len:
Search for the length of the filename or property value in UTF-16 characters.
For example:
len:>20
len:5..10
path:len:>259
len:3
Default: Disabled.
menu-break:
Show this filter or bookmark in a new menu column in context menus.
For example:
menu-break:
Default: Show the filter or bookmark in one long context menu.
menu-separator:
Show this filter as a menu separator in context menus.
For example:
menu-separator:
Default: Show filter by name.
metric:
no-metric:
Use the metric size standard.
For example:
metric:size:1kb = size:1000
Default: JEDEC. (see Tools -> Options -> Size Standard setting)
multi-line:
Controls how ^ and $ behave in regex searches.
When enabled, ^ and $ match the start and end of each line.
When disabled, ^ and $ match the start and end of the entire text.
For example:
multiline:regex:content:"^A line of text$"
Default: Disabled.
See also: regex:
multi-string:
no-multi-string:
Treats semicolon (;) separated property values as a list of individual strings.
When enabled, matching is applied to each item in the list separately.
When disabled, the entire value is treated as a single string.
For example:
multistring:regex:content:"^An item in a list$"
nomultistring:zipfilename:"abc.txt;123.txt"
Default: Enabled for properties that support multiple values. Otherwise disabled.
See also: regex:
See also: all-strings:
no-!:
Disable the not operator (!).
For example:
no-!:!readme.txt
Default: Allow the not operator (!).
or-filter:
Use in a filter search.
OR this filter when multiple filters are selected.
For example:
or-filter: ext:mp3;jpg
Default: OR multiple filters.
See also: and-filter:
or-precedence:
Makes OR evaluate before AND when parsing search expressions.
For example:
?or-precedence: sonic tails | mario luigi => sonic (tails | mario) luigi
Default: OR > AND. (see Tools -> Options -> Search -> Operator precedence setting)
See also: ?and-precedence:
path:
no-path:
Enables or disables matching against the full path.
When enabled (path:), searches are performed on the full path and name.
When disabled (no-path:), searches are performed on the name only.
For example:
path:system32 hosts
Aliases: \:
Default: Use the Match Path setting under the Search menu.
Use the path-part: search function to search the path part only.
pinyin:
no-pinyin:
Match Chinese characters with QuanPin Pinyin.
For example:
pinyin:nihao = matches: 你好
Aliases: py:
Default: Use Tools -> Options -> Advanced -> pinyin setting. (disabled by default)
See also: pinyin_type
See also: pinyin-jian:
See also: pinyin-quan:
pinyin-jian:
Match Chinese characters with Single Character Pinyin.
For example:
pinyin-jian:nh = matches: 你好
Aliases: pyj:
Default: Disabled.
See also: pinyin:
See also: pinyin-quan:
pinyin-quan:
Match Chinese characters with QuanPin Pinyin.
For example:
pinyin-quan:nihao = matches: 你好
Aliases: pyq:
Default: Disabled.
See also: pinyin-jian:
See also: pinyin:
prefix:
no-prefix:
Enables or disables matching the start of words.
For example:
prefix:ever
Default: Disabled. (see the Prefix setting under the Search menu)
ignore-punctuation:
no-ignore-punctuation:
Controls whether punctuation in filenames or property values is ignored.
For example:
ignore-punctuation:spiderman = matches spider-man
Aliases: nopunc:
Default: Disabled. (see the Ignore Punctuation setting under the Search menu)
See also: ignore_punctuation_type
regex:
Enables regular expressions.
When enabled, the search term parser will eat all | characters.
Use regex*: (or regex:function*:) to treat the rest of the search as literal text.
For example:
regex:content:^foo
regex:content:gr(a|e)y
regex:content*:abc 123 "text in quotes"
case:regex:content:^FOO
Default: Disabled. (see the Regular Expressions setting under the Search menu)
See also: dot-all:
See also: global:
See also: multi-line:
See also: ungreedy:
enable-result-omissions:
disable-result-omissions:
Enables or disables result omissions globally.
Default: Disabled. (see the Enable Result Omissions setting under the Index menu)
no-reorder:
Disables search term reordering.
When enabled, search terms are reordered from fastest to slowest.
For example:
noreorder:content:^foo bar.txt
Default: Enabled.
search-current-results:
no-search-current-results:
Enables or disables searching within the current results.
Everything will search within the current results when possible to improve performance.
Use no-search-current-results: to perform a full re-search.
Use search-current-results: to force Everything to search the current results.
For example:
no-search-current-results: dm:5mins
Default: Enabled.
soundex:
Match files by SQL soundex.
The prefix is matched.
Combine with whole-words: to match whole words.
Only A-Z, a-z letters are currently supported.
For example:
soundex:david
soundex:artist:michael
Default: Disabled.
star-all:
Controls whether wildcard * matches path separators.
When enabled, * matches all characters.
When disabled, * matches all characters except \ and /.
For example:
starall:c:*abc.txt
Default: Disabled. (see Tools -> Options -> Advanced -> wildcards_star_all)
start-with:
Matches only the start of a filename or property value.
For example:
startwith:ever
Aliases: ^:
Default: Disabled.
no-substitute:
Disables property substitution.
When enabled, $property: is replaced with the value of the specified property.
For example:
stem:$extension: = matches files that have the extension in the stem. (eg: txt.txt)
no-substitute:$extension: = finds the literal text $extension: in the filename
Default: Enabled for filenames and filename-like property values. Otherwise disabled.
suffix:
no-suffix:
Enables or disables matching the end of words.
For example:
suffix:hosts
Default: Disabled. (see the Suffix setting under the Search menu)
enable-temp-result-omissions:
disable-temp-result-omissions:
Enables or disables temporary result omissions globally.
Default: Disabled. (see the Enable Temporary Result Omissions setting under the Index menu)
to-integer:
Compare a filename or property value as an integer.
For example:
to-integer:album:>10
Default: Disabled.
to-number:
Compare a filename or property value as a real number.
For example:
to-number:album:>1.5
Aliases: #:
Default: Disabled.
to-string:
Compare a property value as text.
For example:
tostring:date-modified:/02/
regex:tostring:date-modified:^201
Default: Disabled.
ungreedy:
When enabled, regex quantifiers default to ungreedy (lazy) matching.
When disabled, regex quantifiers default to greedy matching.
For example:
ungreedy:regex:(.*)
ungreedy:regex:(.*?)
Default: Disabled.
See also: regex:
whole:
Matches the whole filename or property value.
For example:
whole:hosts
Aliases: whole-filename: wfn: entire:
Default: Disabled.
ignore-whitespace:
no-ignore-whitespace:
Controls whether whitespace in filenames or property values is ignored.
For example:
ignore-whitespace:spiderman matches spider man
Aliases: nows:
Default: Disabled. (see the Ignore White-Space setting under the Search menu)
whole-words:
no-whole-words:
Enables or disables whole word matching.
For example:
whole-words:foo
Aliases: ww:
Default: Disabled. (see the Match Whole Words setting under the Search menu)
wildcards:
no-wildcards:
Enables extended wildcard matching or disables wildcard matching.
By default, * and ? are treated as filename wildcards (for example *.mp3).
When enabled, wildcards: uses extended wildcard syntax for advanced search patterns.
Use wildcards*: (or wildcards:function*:) to treat the rest of the search as literal text.
Use no-wildcards: to disable all wildcard matching, allowing literal * and ? characters to be searched.
Use &quest: for ? and &ast: for * to escape filename wildcard characters.
Escaping a filename wildcard disables filename wildcard matching.
* = matches zero or more characters
? = matches any single character
# = matches any single digit (0-9)
[ ] = matches any character in the set
[! ] = matches any character not in the set
\ = escapes the next character (supports C-style escape sequences)
For example:
wildcards:####*
wildcards:[a-m]*
wildcards:content:foo*
wildcards:content*:a b c*
wildcards:*\x0D\x0A
no-wildcards:?
Default:
Filename wildcards: Enabled. (see Tools -> Options -> Advanced -> wildcards)
Extended wildcards: Disabled.
See also
search syntax
search functions
ETP 服务器
Everything ETP/FTP 服务器让您可以从 Everything 客户端或 FTP 客户端中搜索和访问您的文件。
启动 ETP/FTP 服务器
启动 ETP/FTP 服务器
在待共享文件电脑上,在 "Everything" 中,打开工具菜单,点击选项。
点击 ETP/FTP 页面。
选择启用 ETP/FTP 服务器。
点击确定。
请确认您共享分区在服务器上为分区名。
例如,共享分区 C: 为:C
请查阅 ETP 路径重写以使用自定义共享。
连接 ETP 服务器
连接 ETP 服务器:
在 "Everything" 中,打开工具菜单,点击连接 ETP 服务器...。
输入服务器名或主机 IP。
点击确定。
ETP 链接类型
以下四种链接类型可适用于 Everything 客户端访问 ETP 服务器文件。
当您连接 ETP 服务器时可以指定链接类型。
链接类型 说明
C: 不更改,路径与服务器上共享路径一致。当您在服务器上使用服虚拟盘符而客户端中使用网络映射分区时很有用。
\\Server\C 使用 Windows 共享 (默认链接类型)。默认情况下,这些分享不存在,您必须在服务器创建共享才可以使用。
\\Server\C$ 使用默认管理员分区共享。
ftp://host/C: 使用 FTP 链接。
用户名和密码
更高 ETP/FTP 服务器用户名和密码:
在 "Everything" 中,打开工具菜单,点击选项。
点击 ETP/FTP 服务器页面。
输入新的用户名和密码。
点击确定。
禁用文件下载
禁用 ETP/FTP 文件下载:
在 "Everything" 中,打开工具菜单,点击选项。
点击 ETP/FTP 服务器页面。
取消选择允许文件下载。
点击确定。
索引不同分卷
查阅多实例以索引 FTP 服务器上不同 NTFS 分卷。
创建 Windows 共享
Everything 在共享分区为单字母时工作良好,例如,共享 C: 分区为 C,D: 分区为 D 等。
创建单个文件夹 Windows 共享,请按照以下步骤:
例如,想要托管单个文件夹 ETP/FTP 服务器:
C:\share
为本地文件夹 c:\share 创建虚拟盘符:
在命令提示符中,运行:
subst H: c:\share
配置仅索引 H: 分区。
在 "Everything" 中,打开工具菜单,点击选项。
点击 NTFS 页面。
取消选择所有分区包含到数据库,除了 H: 分区。
点击确定。
添加共享明到 c:\share
在资源管理器中,右键点击 c:\share 并选择属性。
点击共享页面。
点击高级共享...。
点击添加。
输入 H 为共享名。
点击确定。
点击确定。
点击关闭。
以 \\Server\C 链接连接 ETP/FTP 服务器。
安全性
Everything 索引的每个文件和文件夹都可以通过 ETP 服务器搜索和下载。
禁用文件下载:
在 "Everything" 中,打开工具菜单,点击选项。
点击 ETP 服务器页面。
取消选择允许文件下载。
查阅禁用 ETP/FTP 服务器以移除 ETP 服务器选项和阻止 ETP 服务器启动。
禁用 ETP/FTP 服务器
禁用 ETP/FTP 服务器:
退出 Everything (右键点击 Everything 托盘图标并选择退出)
打开 Everything.exe 同目录下 Everything.ini 文件。
更改以下行:
allow_etp_server=1
为:
allow_etp_server=0
保存更改并重启 Everything。
ETP 客户端路径重写
ETP 客户端可以重写 ETP 服务器路径以便从不同的共享访问。
例如,重写路径 D:\music 到 \\server\music 和 "D:\Install Files" 到 "\\server\Install Files"
在 ETP 客户端上重写路径。
On the Everything ETP client PC:
完全退出 Everything (右键点击 Everything 托盘图标并选择退出)
打开 %APPDATA%\Everything\Everything.ini
更改以下行:
etp_client_rewrite_patterns=
etp_client_rewrite_substitutions=
为:
etp_client_rewrite_patterns=D:\music;"D:\\Install Files"
etp_client_rewrite_substitutions=\\server\music;"\\\\server\\Install Files"
保存更改并重启 Everything。
重写样式必须匹配服务器路径。这不会被链接类型影响。
以服务方式运行 ETP 服务器
以客户端服务方式运行 ETP 服务器(不要与 Everything 服务混淆):
复制 Everything.exe t到空文件夹。
运行 Everything.exe
请确认已禁用保存设置和数据到 %APPDATA%\Everything。
请确认未安装 Everything 服务。
配置索引。
配置ETP 服务器设置。
完全退出 Everything (右键点击 Everything 托盘图标并选择退出)。
打开命令行窗口,转到 Everything.exe
运行以下命令以安装客户端服务:
Everything.exe -install-client-service
此目录将安装并以客户端服务方式启动 Everything ETP 服务器。
卸载 Everything 客户端服务:
打开命令行窗口,转到 Everything.exe
运行以下命令以卸载客户端服务:
Everything.exe -uninstall-client-service
自动连接到 ETP 服务器
启动 Everything 时自动连接到 ETP 服务器:
在 "Everything" 中,打开工具菜单,点击选项。
点击首页页面。
更改索引为:ETP 服务器。
设置 ETP 服务器为:username:password@host:port
设置预设链接类型。
点击确定。
疑难解答
无法启动 ETP 服务器:绑定失败 10048
请确认没有已运行 FTP 服务器占用端口 21 或使用不同的 ETP 服务器端口。
更改 ETP 服务器端口:
在 "Everything" 中,打开工具菜单,点击选项。
点击 ETP/FTP 服务器页面。
更改端口为:2121。
点击确定。
当连接 ETP 服务器时请匹配端口号。
更多请查阅
多实例
ETP/FTP 服务器命令行选项
Everything.ini 中 ETP/FTP 服务器选项
ETP/FTP 服务器选项
http://en.wikipedia.org/wiki/FTP
Everything Server
Everything 1.5 introduces the Everything Server.
Requires Everything 1.5
The Everything Server allows you to:
Share a centralized index with multiple users.
Keep client indexes up to date.
Create path remappings.
Limit access with user credentials.
Hosting an Everything Server in a business or enterprise environment requires a Site License.
A Site License is not required for personal use.
The Everything Server shares indexes and index changes only.
Files are accessed with Windows Shares.
Connections are encrypted with AES.
Server install
Server setup
Server service
Setup server firewall
Client setup
Group Policies
Advanced INI settings
Server install
To add the Everything Server plugin:
Download and run the Everything Server plugin installer.
Server setup
To create an Everything Server:
On your server PC, In Everything, from the Tools menu, click Options.
Click Index on the left.
Check Enable Journal (it is enabled by default).
Set Maximum Size to: 32768 KB (32768 KB is recommended for an Everything Server, 1024 KB is the default).
Click NTFS on the left.
Uncheck Automatically include new fixed volumes.
Uncheck Automatically include new removable volumes.
Click ReFS on the left.
Uncheck Automatically include new fixed volumes.
Uncheck Automatically include new removable volumes.
Click Everything Server under Plugins on the left.
Check Enable Everything Server
Under Users, click Add....
Click OK to add the default (empty) user account.
Set a Password (optional)
Under Include only, click Add....
Set the Path to the local server path, for example: D:\media
Set the Remap to the network share, for example: \\server\media
Click OK.
Repeat for additional shares.
Clients will only have access to the filenames in the paths you specify in include only, leave include only blank to share all files.
Click OK to complete setup and start the Everything Server.
If prompted with Windows Firewall, select allow Everything through the Windows Firewall.
The Everything Server requires an enabled Index Journal to synchronize client indexes.
The Everything Server uses port 14630 by default.
To change the Everything Server port:
On your server PC, In Everything, from the Tools menu, click Options.
Click Everything Server under Plugins on the left.
Set Port to the new port number, for example: 14631
Click OK.
The Everything Server is accessible from all interfaces by default.
To limit the Everything Server to a specific interface:
On your server PC, In Everything, from the Tools menu, click Options.
Click Everything Server under Plugins on the left.
Set Bind to interfaces to a semicolon list of interfaces, for example: to the limit to local access only, set to: localhost
(leave empty to bind to all interfaces)
Click OK.
You can create additional user credentials for a different set of paths.
To add another user:
On your server PC, In Everything, from the Tools menu, click Options.
Click Everything Server under Plugins on the left.
Under Users, click Add....
Type in a user name and click OK.
Set the password and include only paths to restrict access.
Click OK.
Only filename, size and date modified properties are shared with clients by default.
To share date created and attribute information with clients:
On your server PC, In Everything, from the Tools menu, click Options.
Click the Indexes tab on the left.
Check Index Date Created.
Check Index Attributes.
Click OK.
To register the Everything Server:
On your server PC, In Everything, from the Tools menu, click Options.
Click Everything Server under Plugins on the left.
Click Register....
Type in your Organization and Key.
If you don't have a key, click Buy Site License.
Click OK.
Your License information is shown at the top.
Click OK.
Server service
Not to be confused with the Everything Service.
The Everything Service is not required when running the Everything Server as a service.
To install the Everything Server as a service:
Completely exit out of Everything (From the File menu, click Exit)
Copy Everything.exe to a new folder (eg: C:\EverythingServer).
Please make sure Everything has write permission to this folder.
Launch Everything.exe as an administrator.
In Everything, from the Tools menu, click Options.
Click the General tab on the left.
Uncheck Store settings and data in %APPDATA%\Everything.
Click OK.
Setup indexes.
Setup the Everything Server.
Completely exit out of Everything (From the File menu, click Exit)
Install the Everything client service with the following command line option:
Everything.exe -install-client-service
There is no interface when running the Everything Server as a service.
To change Everything Server settings after the Everything Server service is installed:
Stop the Everything client service with the following command line option:
Everything.exe -stop-client-service
Launch Everything.exe as an administrator (from: C:\EverythingServer).
Setup the Everything Server.
Completely exit out of Everything (From the File menu, click Exit)
Restart the Everything client service with the following command line option:
Everything.exe -start-client-service
Setup server firewall
To allow the Everything Server through your Windows Firewall:
From the Start menu, type: firewall
Select Firewall & network protection.
Click Allow an app through firewall.
Click Change settings.
Click Allow another app....
Click Browse.
Select Everything.exe from your Everything installation folder.
Click Add.
Check the desired network access (Domain / Private / Public).
Click OK.
Client setup
To add an Everything Server to your client index:
On your client PC, In Everything, from the Tools menu, click Options.
Click Network Index on the left.
Click Add....
Type in the host name or IP, for example: server or 192.168.0.10
Click OK.
Set the username (leave blank to use the default user account).
Set the password (it must match what was set on the Everything Server).
Click OK.
All paths that the server allows are included by default.
To limit and/or remap paths on the client:
On your client PC, In Everything, from the Tools menu, click Options.
Click Network Index on the left.
Select the Remote Everything Index.
Under Include only, click Add....
Set Path to the server path, for example: \\server\media (or D:\media if the server is not using remapping)
Set Mount as to the mounted path, for example: \\server\media
Click OK.
To disable monitoring changes to a remote Everything index:
On your client PC, In Everything, from the Tools menu, click Options.
Click Network Index on the left.
Select the Remote Everything Index.
Uncheck Monitor changes.
Click OK.
Group Policies
To create policies to lock down client settings, please see Everything Group Policies.
Advanced INI settings
Everything Server settings are stored in your %APPDATA%\Everything\Plugins.ini
(Plugins-1.5a for the alpha version)
Exit Everything before making a change to your Plugins.ini (File -> Exit)
Everything Server settings are stored under the [everything_server64.dll] or [everything_server32.dll] section, depending on which version you installed.
index_snapshot_cache_timeout
The number of milliseconds to keep an index snapshot in cache.
The default is: 60000
index_snapshot_max_count
The maximum number of index snapshots.
Clients will wait for an index snapshot if the maximum number of index snapshots is exceeded.
Cached index snapshots can be cleared if the maximum number of index snapshots is exceeded.
The default is: 8
; 我的腾讯QQ电子邮箱地址是: 595076941@qq.com
_需在DelayedStartupTool中设置跟随系统启动
; 我的腾讯QQ电子邮箱地址是: 595076941@qq.com
AutoHotkey四种定位方案清晰区分Control原生-UIA-AutomationId-FindText-ImageSearch-浏览器网页元素控件控制.txt
元宝
https://yuanbao.tencent.com/chat/
豆包
https://www.doubao.com/chat/
千问
https://www.qianwenai.com/
# AHK 三种定位方案清晰区分:UIA (AutomationId) / Control 原生 / ImageSearch
先一句话总结优先级:
**优先 UIA AutomationId → 其次原生 Control(ClassNN/ahk\_id)→ 最后迫不得已才用 ImageSearch**
## 一、原生 Control 系列(ControlClick / ControlSetText / ControlGet)
### ✅ 适用场景
底层是 **Win32 窗口控件(标准 Windows 控件)**:按钮、输入框、复选框、ListBox、ListView 等传统控件。
定位依据:`ClassNN`、`ahk_id(HWND)`、窗口标题。
```
ControlClick, Button1, ahk_exe notepad.exe
ControlSetText, Edit1, 文本, ahk_exe notepad.exe
```
### 优点
1. **不需要任何第三方库**,AHK v1/v2 原生支持
2. 速度极快,资源占用低
3. 后台操作!**不需要窗口可见、不需要置顶,最小化大多依然生效**
### ❌ 缺点 & 不适用场景
1. **现代软件(WPF、UWP、Qt、Electron)基本失效**
这些软件控件不再是传统 Win32 控件,整个窗口往往只有**一个主 Edit / 一个 Hwnd**,所有按钮共享同一个 HWND,没有独立 ClassNN。
>
> 例子:新版微信、QQ、微软商店、设置、VS、Notepad++、计算器 (UWP)、Edge/Chrome 网页界面
2. 无法区分同一控件内多个子元素
### 典型适合用 Control 的程序
记事本、旧版资源管理器、老式 MFC 程序、简单弹窗、Office 部分传统窗口
---
## 二、UIAutomation(UIA + AutomationId)
### ✅ 适用场景
**现代界面程序:WPF / UWP / WinUI / Qt / 部分 Electron**
控件拥有 UIA 属性:`AutomationId、Name、ControlType`
>
> AutomationId 是 UIA 里最优选择:文字语言切换、界面改版,ID 经常保持不变!
### 优点
1. 能识别**没有独立 HWND 的虚拟控件**(原生 Control 完全抓不到)
2. AutomationId 稳定性 > 控件显示文字 (Name)
3. 不受界面文字汉化 / 语言包影响
### ❌ 缺点
1. 需要第三方库(Descolada UIA-v2 / UIA\_Interface)
2. **绝大多数情况要求窗口至少部分可见**,窗口最小化后很多程序 UIA 操作失效(不能纯后台)
3. 部分软件厂商**禁用 UIA 接口**(部分游戏、加固客户端),拿不到任何 UIA 属性
4. Chromium 浏览器(Chrome/Edge 网页)**网页 DOM 元素没有 AutomationId**,只能靠 Name / 正则
### 典型适合 UIA AutomationId
Windows 计算器、系统设置、WPF 开发工具、新版 Outlook、Qt 桌面客户端
### ⚠️ 重要提醒
如果控件**没有暴露 AutomationId**(Inspect 查看为空),就不能用,只能退而求其次用 Name、ClassName 等 UIA 属性。
---
## 三、ImageSearch / PixelSearch(图像 / 像素查找)
### ✅ 适用场景(**最后备选方案**)
满足下面任意一条才考虑图像识别:
1. 程序**既没有 Win32 控件,也不支持 UIA**(很多游戏、加密客户端、老旧全屏软件、部分模拟器)
2. 界面是绘制画面,自定义渲染,没有标准控件树
3. 目标只是一张图标、固定色块,没有任何可抓取控件属性
### 优点
万能,不依赖程序提供任何自动化接口
### ❌ 巨大短板
1. **极度依赖窗口可见,不能最小化后台运行**
2. 分辨率、缩放、主题、抗锯齿、窗口位置变化极易失效
3. 速度最慢,占用 CPU 高
4. 系统 DPI 缩放(125%/150%)经常导致图片匹配失败
5. 界面轻微改版,图片就得重新截取
### 典型场景
网游、模拟器画面、部分私有闭源工业软件、视频播放器自定义 UI
---
# 📊 对比速查表
表格
| 方案 | 依赖库 | 是否支持后台最小化 | 稳定性 | 优先度 |
| --- | --- | --- | --- | --- |
| Control 原生 (ClassNN/ahk\_id) | 无 | ✅ 大多支持后台 | 高(传统程序) | 1(传统 Win32 软件) |
| UIA + AutomationId | 需要 UIA 库 | ❌ 多数程序最小化失效 | **最高** | 1(现代 WPF/UWP/Qt) |
| UIA Name / 其他属性 | 需要 UIA 库 | ❌ 多数失效 | 中等(文字会变) | 2(没有 AutomationId 时) |
| ImageSearch | 无 | ❌ 基本不能后台 | 最低 | 兜底,尽量避免 |
# 🎯 决策流程(照着判断即可)
1. 先用 **Window Spy(AHK 自带)** 查看目标控件:
- 能抓到独立 `ClassNN` → **先用 Control 系列命令**
2. Window Spy 看不到独立控件,整个窗口只有一个控件:
→ 打开 `Inspect.exe` 检测 UIA
- Inspect 能看到控件树,并且存在 **AutomationId**
→ **UIA + AutomationId(首选)**
- Inspect 能看到控件树,但 AutomationId 为空
→ UIA 使用 Name/ControlType 等条件
- Inspect 一片空白,抓取不到任何子控件
→ **只能 ImageSearch / PixelSearch**
# 常见踩坑实例
1. **Windows 11 计算器**
Window Spy 只有一个窗口,无子 ClassNN;Inspect 存在 AutomationId → 使用 UIA
2. **记事本 notepad.exe**
Window Spy 能抓到 Edit1、Button → 直接 Control
3. **Chrome 网页内部按钮**
没有独立 HWND;Inspect 看不到网页 DOM 的 AutomationId → UIA 靠 Name / 正则,或者浏览器自动化 (Selenium)
4. **网络游戏**
Inspect 无法读取控件树 → ImageSearch
# 补充实用建议
1. 不要迷信 AutomationId:部分软件升级会重置 AutomationId,遇到这种情况改用 UIA 组合条件(ControlType+Name)
2. 如果需求是**后台静默运行、窗口可以最小化**:优先尝试原生 Control;UIA 和图像搜索基本做不到后台
3. Electron 软件区分:Electron**窗口外壳有 HWND,但网页内容层大多没有 AutomationId**,不要强行找 AutomationId
如果你告诉我目标软件名称,我可以直接帮你判断该用哪一套方案,并给出示例代码。
浏览器网页 元素控件控制
网页结构固定、要读 DOM / 执行 JS / 取接口数据 → Chrome.ahk(DevTools 协议) 最稳,首选
不能开调试端口、只能像真人一样摸界面 → UIA-v2 + UIA_Browser(或旧路线 Acc/MSAA)
纯老 IE 页面或自己嵌 WebView2 → IE COM / WebView2 COM
以上都不行再考虑 ControlSend+坐标+图片识别,那是下策
; 我的腾讯QQ电子邮箱地址是: 595076941@qq.com
; 只要把AutoHotkey脚本代码复制粘贴到元宝之后就能分析修复优化脚本代码 ; 元宝 https://yuanbao.tencent.com/chat/
;类名判断太“硬编码” ;WindowsForms10.Edit.app.0.xxxxx 里:
;218f99c1 / 134c08f 是 随机 AppDomain / 编译哈希 控件类名随机变化
;_r6_ / _r8_ / _ad11 跟 .NET / Win10-11 / DPI 有关
;你每换一台机器/重装系统都可能失效。
; 判断:只要是 WinForms 的 Edit 就行,不关心后面哈希
; 原来的错误的代码 if ((OutputVar="WindowsForms10.Edit.app.0.218f99c1") or (OutputVar="WindowsForms10.Edit.app.0.134c08f_r6_ad11") or (OutputVar="WindowsForms10.Edit.app.0.134c08f_r8_ad11"))
; 下面一行是修改之后的正确的代码,适用于不同的电脑环境和不同的Windows版本,能够在随机 AppDomain / 编译哈希 情况下长期正确稳定的运行
if (InStr(OutputVar, "WindowsForms10.Edit.app"))
https://www.autoahk.com/archives/58891
https://www.cnblogs.com/delphixx/p/19836312
www.cnblogs.com/delphixx

浙公网安备 33010602011771号