Google and SOAP vs. AppleScript
Google and SOAP vs. AppleScript
- Subject: Google and SOAP vs. AppleScript
- From: iMP <email@hidden>
- Date: Thu, 18 Apr 2002 18:27:29 -0700
Hi:
Lately there's been a lot of talk elsewhere about Google searches
with SOAP. Here's the basics of what I've been doing for a while with
AS and IE:
-- start script -- watch line breaks
set thePrefix to "
http://www.google.com/search?hl=en&q=""
set theSuffix to """
set thePhrase to text returned of [NO BREAK]
(display dialog "Google phrase request:" default answer [NO BREAK]
"type a word or phrase" default button "OK")
set googleRequest to (thePrefix & thePhrase & theSuffix)
tell application "Internet Explorer"
Activate
GetURL googleRequest
end tell
-- end script
A nice thing is that IE will encode the spaces for you. Also, you
could remove the """s and type in a combo request with quotes, for
example:
"scripting.com" how about we bomb mecca and call it even
(Even though you get quotes in the URL, they're fixed in google.)
So in essence all you do is figure out what string is required for a
more advanced search you like to perform and script accordingly. I
made two apps and put them in my Apple Menu; one for a whole phrase,
one for custom search entry. That way I can get to them from any
application.
iMP
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.