Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

File name completion using file name indexer "Everythin


  • Please log in to reply
4 replies to this topic
horseeater
  • Members
  • 3 posts
  • Last active: Apr 18 2010 06:44 PM
  • Joined: 07 Mar 2009
Hey there people, this be my first post, and my first submission.

I created this script that uses the command line tool for "Everything" (<!-- w -->www.voidtools.com<!-- w -->). It makes a query through es.exe, and replaces the keywords that were in the active window with the result. It's crude and makeshift, I know; I couldn't be bothered with being thorough =)
Add to that the fact that it's not the most useful thing in the world, and you end up with a haphazardly coded script.

Here's a screencast:
<!-- m -->http://dl.getdropbox.../screencast.wmv<!-- m -->

If you don't have "Everything", you're missing out! It's the greatest file-name indexer I've come across.

Here's the script

#NoTrayIcon
execpath = e:\programs\everything\es.exe
#z::gosub, complete
#y::gosub, menucomplete


complete:
SetKeyDelay, 4
send {home}
send +{end}
send ^c
send {del}
SetKeyDelay, -1
RunWait, %comspec% /c "%execpath% %clipboard% >>c:\a.txt", , hide
FileReadLine, result, c:\a.txt, 1
Send %result%
FileDelete, C:\a.txt
return



menucomplete:
WinGet, active_id, ID, A

SetKeyDelay, 4
send {home}
send +{end}
send ^c
SetKeyDelay, -1
RunWait, %comspec% /c "%execpath% %clipboard% >>c:\a.txt", , hide
Loop, read, c:\a.txt
{
Menu,fileselectionmenu,Add, %A_LoopReadLine%, MenuHandler
}
FileDelete, C:\a.txt
Menu, fileselectionmenu, Show
Menu, fileselectionmenu, DeleteAll
return



MenuHandler:
WinActivate,ahk_id %active_id%
SetKeyDelay, -1
Send %A_ThisMenuItem%
return


lilalurl.T32
  • Members
  • 391 posts
  • Last active: Jul 05 2011 03:39 PM
  • Joined: 17 May 2007
No time to test it now, but have watched the screencast and must say that the auto-completion in the file dialog looks like a very nice and useful feature.
________
Wiki

horseeater
  • Members
  • 3 posts
  • Last active: Apr 18 2010 06:44 PM
  • Joined: 07 Mar 2009
I appreciate your positive comment lilalurl.T32. I actually sent an email to the author of "Everything" , and included the screencast and the script to convince him it's a cool feature.

On a different note, tools like "Everything" or "Launchy" have become essential to me. I used to keep renamed shortcuts in my Windows folder and fire up the run dialogue to launch apps ( I still do it actually, I type "del" to open the add/remove programs control panel applet for instance). So I'm all for keyboard searching and launching. Two apps, namely "Switcher" (for vista) and "Alt-tab Fingertips" have inspired me to write an app that when called up, displays a list of open windows, and an input box that filters the list when keyword(s) are entered. How easy would it be to code such an app in Autohotkey?

lilalurl.T32
  • Members
  • 391 posts
  • Last active: Jul 05 2011 03:39 PM
  • Joined: 17 May 2007
If I understand correctly what you want, it should be very easy :wink: , just get iswitchw (worst case scenario it will have some elements that will help you in your creation):
<!-- m -->http://www.autohotke...pic.php?t=33353<!-- m -->
________
Cheap glass pipes

horseeater
  • Members
  • 3 posts
  • Last active: Apr 18 2010 06:44 PM
  • Joined: 07 Mar 2009
I was wondering (not that anyone cares), is there a better method to retrieve the text in a field? I used a crude method that involves selecting the whole line and copying it to the clipboard.