• 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
Re: Way to pass GetURL data into a variable?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Way to pass GetURL data into a variable?


  • Subject: Re: Way to pass GetURL data into a variable?
  • From: J J <email@hidden>
  • Date: Sat, 28 Sep 2002 02:00:24 -0700 (PDT)

> Has anyone written a script that pulls web-page data
> into a variable using
> the GetURL OSAX command that they could share?
> Even if one has to download
> to file first, and then read it into a variable,
> that's fine - - - the data I
> have to read is small.

Hi!

Using getURL (or "open location" -> <<event
GURLGURL>>) with simple osaxen, you can't retrieve
data, only open a URL in your pre-defined
browser-mail-news-client...
You need some app to do this, such as URL Access
Scripting or a browser.

A quick sample, a search with Google:

tell application "URL Access Scripting"
activate
download
"http://www.google.com/search?q=applescript+mac"; to
(choose file name) replacing yes with progress
end tell

set thedata to (read result)

--> this should return the results for a query at
Google, then you parse the HTML and extract your
desired info...

Bye!

JJ

* Works under 9.2.2, AS 1.8.2b3
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
_______________________________________________
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: Turn an AppleScript into a .app bundle?
  • Next by Date: Re: Dictionary possibilities [Re: Interesting... AppleScript X??]
  • Previous by thread: Re: Way to pass GetURL data into a variable?
  • Next by thread: Is SMILE the way to go for this?
  • Index(es):
    • Date
    • Thread