• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Google and SOAP vs. AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: Photoshop 7 Applescript improvements
  • Next by Date: Re: OS X AND TypeText
  • Previous by thread: The "eminence" of Microsoft Word
  • Next by thread: Re: Google and SOAP vs. AppleScript
  • Index(es):
    • Date
    • Thread