# Everything Class
使用 Everything 進行搜索
- Everything 是一款非常出名的搜索工具,搜索速度極快
- 使用條件 1.根目錄或指定目錄下存在 Everything的DLL 2.Everything程序正在運行
- 根目錄指的是`A_ScriptDir`,并不是`BeanLib`所在的根目錄。
- DLL 概不提供 自己從 Everything 中提取,或者直接指定本機 Everything 目錄。
- 提取自 RunAny - 一勞永逸的快速啟動 @hui-Zz,主要改動如下
- 精簡方法名
- 調用 __New 時直接獲取 Dll 信息,檢查 Everything 窗口是否存在
## 域 Field
- key:=""
- MatchWholeWord:=false
- DLL:=false
## 方法 Method
### __New(DLLPath:="")
構造一個 Everything 對象
- 會通過 getDll() 檢查 Dll 文件是否存在,如果不存在 `throwWithSt("Not Found Everything.DLL/Everything64.DLL.")`
- 會檢查 `ahk_exe Everything.exe`是否存在,如果不存在`throwWithSt("ahk_exe Everything.exe is not Exist.")`
### getDll(DLLPath:="")
確認Everything的DLL是否存在
- 如果存在,返回名稱,不存在則返回 false
### SetKey(aValue)
設置搜索關鍵詞
return null
### SetMatchWholeWord(aValue)
設置是否全字匹配
return null
### Search(aValue=1)
執行搜索動作 (執行后直接返回匹配數)
- aValue - 意義不明,并非必須填寫
return null
### Count()
返回匹配總數
### GetFileName(aValue)
返回一個文件名
- aValue - 文件名Index
### GetFullPath(aValue,cValue=128)
返回一個文件全路徑
- aValue - 文件路徑Index
### GetVersionString()
獲取 Everything 版本 (@YuKuan貢獻)
### getSearchResultList()
獲取所有結果組成的數組
### isEverythingExist()
檢測 Everything 是否存在
### afEverythingExist()
斷言 Everything 存在
## 示例
```autohotkey
Obj:=new Everything()
Obj.Setkey("xxx")
Obj.Search()
theLen:=Obj.Count()
Str:=Obj.GetFullPath(0)
StrList:=[]
loop,%theLen%{
StrList.push(Obj.GetFullPath(A_Index-1))
}
ExitApp
```
```autohotkey
Obj:=new Everything()
thekey="D:\MyDesk"
Obj.Setkey(thekey)
Obj.Search()
searchResultList:=Obj.getSearchResultList()
```
- 指南 (README)
- 常見問題 (FAQ)
- 更新歷史(CHANGELOG)
- 貢獻指南 (CONTRIBUTING)
- 開源協議 (LICENCE)
- 鳴謝 (ACKNOWLEDGEMENT)
- 文檔模板 (TEMPLATE)
- 新手指南(BEGINNER_GUIDE)
- 語法高亮(HIGHLIGHTING)
- Class
- _Container
- _EX
- _List
- _Map
- _Win
- _Wins
- BeanEnum
- HotString
- HotStringMaps
- InvisibleCharacter
- JSON
- JsonFile
- Method
- ObservableMap
- ObservableObj
- WinEvent
- Timer
- MesToast
- APPLocker
- AutoClassify
- Everything
- Function
- Ini
- AutoInputBox
- ParaChecker
- PathObj
- RunningSpeedTest
- Script
- Switcher
- Stack
- TimeChecker
- Type
- UMSS
- Function
- assert()
- Analyze()
- AnalyzeClassName()
- AutoBind()
- bulkMoveFile()
- ExcelToList()
- getClass()
- getCurrentTime()
- getFunc()
- Instanof()
- InstanceCheck()
- loadMethod()
- LogPrintln()
- rawCall()
- RandomStr()
- showObj()
- Type()
- throwWithSt()
- UseCMD()
- ObjDump()
- Test
- ObjLoad()
- StringMethod
- TypeClass
- MapFactory()