-
-
Save pa-0/0ba637fb81e5bc6ddf8b792c3e728505 to your computer and use it in GitHub Desktop.
Everything Integration with AutoHotkey - Faster Search in Windows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| EverythingPath = ;specify the path here | |
| #IfWinActive ahk_class CabinetWClass | |
| { | |
| F6:: | |
| folder := GetFolder() | |
| run, %EverythingPath% -path "%folder%" | |
| return | |
| } | |
| GetFolder() | |
| { | |
| WinGetClass,var,A | |
| If var in CabinetWClass,ExplorerWClass,Progman | |
| { | |
| IfEqual,var,Progman | |
| v := A_Desktop | |
| else | |
| { | |
| winGetText,Fullpath,A | |
| loop,parse,Fullpath,`r`n | |
| { | |
| IfInString,A_LoopField,:\ | |
| { | |
| StringGetPos,pos,A_Loopfield,:\,L | |
| Stringtrimleft,v,A_loopfield,(pos - 1) | |
| break | |
| } | |
| } | |
| } | |
| return, v | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Requires AutoHotkey v2.0 | |
| EverythingPath :="C:\Program Files\Everything 1.5a\Everything64.exe" | |
| #HotIf WinActive("ahk_class CabinetWClass", ) | |
| { | |
| F6::{ | |
| global | |
| folder := GetFolder() | |
| Run(EverythingPath " -path `"" folder "`"") | |
| return | |
| } | |
| } | |
| GetFolder(){ | |
| var := WinGetClass("A") | |
| if (var ~= "^(?i:CabinetWClass|ExplorerWClass|Progman)$") | |
| { | |
| if (var = "Progman") | |
| v := A_Desktop | |
| else | |
| { | |
| Fullpath := WinGetText("A") | |
| Loop Parse, Fullpath, "`r`n" | |
| { | |
| if InStr(A_LoopField, ":\") | |
| { | |
| pos := InStr(A_Loopfield, ":\",, (0)+1) - 1 | |
| v := SubStr(A_loopfield, ((pos - 1))+1) | |
| break | |
| } | |
| } | |
| } | |
| return v | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment