Quantcast
Channel: voidtools forum
Viewing all articles
Browse latest Browse all 1719

Everything 1.5 Alpha • Everything Menu via AHK

$
0
0
hey y'all!

just wanted to share a bit of random fun I've been having building a Autohotkey menu for Everything 1.5a

Image

the menu items I practically like are the ones where you can copy paths\names of selected items in the everything window when its in the back ground Without bringing it forward. these menu items also only show themselves when a EV window is open.

I created theses myself when I noticed that the top line of hidden text on a selected item is the files full path.
I thinks there's a way of using SDK to get this path..???? I haven't figured that out yet.

if your poking around back here you know how much you're able to do with everything.... Furthermore between everythings SDK and autohotkey there's more than one way to do it!

I'm a NOOB to programing & autohotkey, I know EVs SDK exists but not sure how to utilize it ... Yet. So go easy on my code. :lol:

anyway check it out. Save this code as EV Menu.ahk run it with https://autohotkey.com

the Hotkey to open the menu is Alt + 2

Code:

#warn useenv, off#Persistent#SingleInstance, Forcesourceurl = https://www.voidtools.com/forum/viewtopic.php?t=15972githuburl = https://github.com/indigofairyx;-------------------------; if EV is installed in a custom location the path needs to be defined here...Everything15a = C:\Program Files\Everything 1.5a\Everything64.exeGlobal Everything15aIf !FileExist(everything15a){MsgBox, 4129, , Everything 1.5a was not found at its defualt install location.`n`n Click OK to edit this script where you can update the installed location., 15IfMsgBox OkEditIfMsgBox Cancelreturn}return!2::  ;; alt + 2 to show the everything menuShowevmenu:gosub evmenumenu, ev, showreturnevmenu:menu, ev, addmenu, ev, deleteallMenu, ev, add, <--- Everything Menu --->, Showevmenu; menu, ev, icon, <--- Everything Menu --->, %A_ScriptDir%\Icons\voidtools-14-Everything-White.ico,,28menu, ev, icon, <--- Everything Menu --->, %everything15a%,,28menu, ev, default, <--- Everything Menu --->menu, ev, add, ; line -------------------------menu, ev, add, Run Everything, runeverythingmenu, ev, icon, Run Everything, %everything15a%; menu, ev, icon, Run Everything, %A_ScriptDir%\Icons\voidtools-15-Everything-1.5.icomenu, ev, add, Input Directory Search, EVDirSearch; menu, ev, icon, Input Directory Search, %A_ScriptDir%\Icons\folder search find browse_256x256.icomenu, ev, add, System Index Search [ Input ], EVSISearch; menu, ev, icon, System Index Search [ Input ],%A_ScriptDir%\Icons\voidtools-07-Everything-SkyBlue.ico menu, ev, add, ; line -------------------------menu, ev, add, Go EV AppData Folder, openevdata; menu, ev, icon, Go EV AppData Folder, %A_ScriptDir%\Icons\settings checked Windows 11 Icon 26_256x256.icoif WinExist("ahk_exe everything64.exe"){menu, ev, add, ; line -------------------------menu, ev, Add, <-- An Everything Window is Open -->, Showevmenumenu, ev, add, ; line -------------------------menu, ev, add, Full Path - Copy, evgetselected; menu, ev, icon, Full Path - Copy, %A_ScriptDir%\Icons\clipboard path 8bit xfav small RXResEnu_24_16x16.icomenu, ev, add, Dir Path - Copy, evgetselected; menu, ev, icon, Dir Path - Copy, %A_ScriptDir%\Icons\document copy p path FLUENT_colored_386_64x64.icomenu, ev, add, Name - Copy, evgetselectedmenu, ev, add, Copy Full Path of ALL Selected Items, evcopyallpathsmenu, ev, add, Open Dir Path, evgetselectedif FileExist("C:\Program Files\GPSoftware\Directory Opus\dopus.exe")menu, ev, icon, Open Dir Path, C:\Program Files\GPSoftware\Directory Opus\dopus.exeelsemenu, ev, icon, Open Dir Path, explorer.exe}else{; show nothing... How will this refresh?? Hmmm}menu, ev, add, ; line -------------------------menu, ev, add, Close This Menu, CloseMenumenu, ev, add, Quit\Exit App, exit; menu, ev, icon, Close This Menu, %A_ScriptDir%\Icons\aero Close_24x24-32b.ico; menu, ev, showreturnevgetselected:DetectHiddenText, on ; the file path of selected item is hiddenWinGetText, selected, ahk_exe everything64.exeif errorlevel{tooltip, Everything doesn't seem to be running.sleep 2000tooltipreturn}RegExMatch(selected, "m)^(.*)$", selected) ;; match first line of captured string, if multiple items are selected ev still only reports the most recently clickedif !RegExMatch(selected, ".*\\([^\\]+)\\?$", "$1") ; match a file path in captured hidden text, {tooltip Everything is running thou nothing is selected.sleep 1500tooltipreturn}; msgbox, %selected%sleep 50SplitPath, selected, filename, dir, ext, filestem, drive; msgbox, selected: %selected%`n`n`nfilename: %filename%`ndir: %dir%`nfilestem: %filestem%`next: %ext%`n`nthismenuitem: %A_thismenuitem%`nthishotkey: %A_thishotkey%`nclip: %clipboard%clipboard := ""sleep 30if (A_ThisMenuItem = "Full Path - Copy"){clipboard := selectedreturn}if (A_ThisMenuItem = "Dir Path - Copy"){clipboard := dirreturn}if (A_ThisMenuItem = "Name - Copy"){Clipboard := filenamereturn}if (A_thismenuitem = "Open Dir Path"){run, %dir%return}if (A_ThisHotkey = "$pause"){clipboard := selectedreturn}returnevcopyallpaths:; testing, this label sends a hot to EV even if it's the background. I've set my own hot key for Copy Full Path. so this works thou you may need to change the hotkey sent belowControlSend, SysListView321, ^+{p}, Everything 1.5returnruneverything:SetTitleMatchMode, 2IfWinExist, Everything 1.5{WinActivate, Everything 1.5;; // optional actions can be carried out when activating an existing window; WinWait, ahk_exe Everything64.exe,,7; if errorlevel; tooltip, Err. Couldn't launch everything.; {; sleep 1500; tooltip; return; }; soundbeep, 800,; Sleep 100; ControlSend, , ^{L} ;this activates the search bar if its not already selected; ControlFocus, Edit1, ahk_class EVERYTHING; Send, ^a} else {Run, %Everything15a%}returnopenevdata:run, %appdata%\everythingreturnEVSISearch:InputBox, Search , Everyting SI Content Search via AHK, Search for the System Index for what..., , , , , , , ,if (Search = ""){tooltip, Canceled`nA search string is required.sleep 1000tooltipreturn}sleep 200run %everything15a% -newtab -s* si*: "%Search%"ReturnEVDirSearch:InputBox, Search , Everyting Location Search via AHK, Search for what...`nEVs Syntax is sent from here.`nYou can pick a folder to search in the next popup.`nIf Left blank the whole folder will be displayed., , , , , , , ,sleep 200fileselectFolder, Location, , 2, Select a Location to find  " %Search% "  in.if (Location = ""){tooltip Canceled - You did not select a valid Locationsleep 1000tooltipreturn}sleep 200run %everything15a% -newtab -s* "%Location%" %Search%ReturnCloseMenu:send, {esc}returnexit:exitappReturn

Statistics: Posted by Xavierarmand — Wed Dec 18, 2024 4:58 am



Viewing all articles
Browse latest Browse all 1719

Trending Articles