Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Quick search with Quicksilver and EasyFind (See related posts)

// A script to quickly search files and folders using Quicksilver and EasyFind.

(*
A script to quickly search files and folders using Quicksilver [1] and EasyFind [2].
Written by Simon Dorfman, January 8, 2006. www.SimonDorfman.com

Save this script to ~/Library/Application Support/Quicksilver/Actions/EasyFind.scpt
You'll need to have "Enable access for assisstive devices" enabled under Universal Access in System Preferences.
To use:
	1. activate Quicksilver
	2. type "." (i.e. hit the period key)
	3. type the text you want to search for (i.e. httpd.conf)
	4. press tab
	5. start typing "EasyFind.scpt"
	6. once Quicksilver finds "EasyFind.scpt", press return
	
[1] http://www.versiontracker.com/dyn/moreinfo/macosx/22549
[2] http://www.versiontracker.com/dyn/moreinfo/macosx/11706
*)

using terms from application "Quicksilver"
	on process text t
		tell application "EasyFind" to activate
		tell application "System Events"
			tell process "EasyFind"
				set value of text field 1 of window 1 to t --type text in search field
				--uncomment your preferred search option, or save separate scripts with each option
				click radio button 1 of radio group 1 of window 1 --"Files & Folders"
				--click radio button 2 of radio group 1 of window 1 --"Only Files"
				--click radio button 3 of radio group 1 of window 1 --"Only Folders"
				--click radio button 4 of radio group 1 of window 1 --"File Contents"
				click button 4 of window 1 --start search
			end tell
		end tell
	end process text
end using terms from

Comments on this post

revscat posts on Jan 09, 2006 at 10:31
What is the advantage to using this instead of Spotlight?

You need to create an account or log in to post comments to this site.


Click here to browse all 5146 code snippets

Related Posts