Googler Script |
| Author |
John Gruber
|
| Last modified |
2002-04-21
|
|
What is this?
This script can be used to automatically send some
text to Google for searching
|
-- This script uses the selected text in the frontmost window
-- as a query string for the Google search engine. If there is
-- no selection, it prompts for one in a dialog box.
tell application "Mailsmith"
set s to selection of window 1 as string
if s = "" then
set s to text returned of ¬
(display dialog "Search terms:" default answer "")
end if
set searchterms to ""
repeat with i from 1 to count words of s
set searchterms to searchterms & "+" & word i of s
end repeat
if s is not "" then
tell application "Internet Explorer"
Activate
GetURL "http://www.google.com/search?hl=en&q=" & searchterms
end tell
end if
end tell
|