Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Define words via Google and AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Define words via Google and AppleScript
Authored by: BulbVivid on Feb 16, '05 11:18:32AM

Cool dictionary script.

I submitted a similar hint some time ago (http://www.macosxhints.com/article.php?story=20031111202259919&query=clipboard+dictionary) that you may want to check out.

The script searches for whatever is in the clipboard using whatever URL you give it. Here it is using Google's define:

tell application "Safari"
activate

if not (exists document 1) then
make new document at the beginning of documents
end if

set page_info to the clipboard
set page_url to "http://www.google.com/search?q=define:" & page_info
set URL of document 1 to page_url

end tell

I use an iKey sequence for the copy command (cause I haven't had time/can't figure out/don't know if it's possible to applescript a global copy) and to run the script, to where all I have to do is highlight a word and hit a key command (or a mouse button) to copy it and look it up in my dictionary (I use the script to do Google searches the same way).

Though it's not quite as handy for looking up words not already typed (I use a bookmarklet in Safari for that, though I'll likely implement the parent hint for that now), it would be a nice supplement to the parent hint.

Jason



[ Reply to This | # ]