Re: Way to pass GetURL data into a variable?
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.