Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dvydra/181193 to your computer and use it in GitHub Desktop.
Save dvydra/181193 to your computer and use it in GitHub Desktop.
# Quick and Dirty Safari 4 Snow Leopard search shortcuts!
# Requires Quicksilver. Quicksilver b56a7 works in Snow Leopard.
# 1. put this script into your Safari scripts folder: /Users/username/Library/Scripts/Applications/Safari
# 2. in quicksilver preferences, add your safari scripts folder as catalog entry.
# 3. in quicksilver preferences, add a trigger to run the script, and assign a keyboard shortcut.
# 4. in safari, press the shortcut key, enter your search string and it will open a new safari window and perform the search using your search term
tell application "Safari"
display dialog "IMDB Search" default answer ""
set dialogInfo to result
set gowhere to text returned of dialogInfo
#search imdb
open location "http://www.imdb.com/find?s=all&q=" & gowhere & "&x=0&y=0"
#Or you could search wikipedia
#open location "http://www.google.com/search?q=" & gowhere & "%20site%3Aen.wikipedia.org&btnI=I%27m+Feeling+Lucky"
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment