• 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: Save Me
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Save Me


  • Subject: Re: Save Me
  • From: Rob Stott <email@hidden>
  • Date: Sun, 27 Jan 2002 00:01:21 +0000

> Hello All,
>
> I am an occasional scripter and am trying to either save a web page in a
> file or to the clipboard in it's text form.
>
> I have OS 9.1, the AOL browser, netscape, and Internet Explorer. It
> doesn't matter which one I use.

Hi, I had a similar need and came up with the script below - replace theURL
and theFile to whatever you need them to be. Obviously you'll need "URL
Access Scripting" for this to work.

Hope its of some help to you!

Rob

---


tell application "Finder"
set theUrl to "http://www.yahoo.com";
set theFile to "Macintosh HD:Desktop Folder:download.html"
end tell


tell application "URL Access Scripting"
with timeout of 60 seconds
try
,
download theUrl to file theFile replacing yes with progress
display dialog "Download Successful" with icon note
on error
display dialog "Sorry, couldn't download the webpage" with icon
2
end try
end timeout
end tell


References: 
 >Save Me (From: harold w patrick <email@hidden>)

  • Prev by Date: Re: Stuff and Rename according to date/time
  • Next by Date: Re: solutions to scripting addition terminology confilicts
  • Previous by thread: Re: Save Me
  • Next by thread: Problems with speed & issues with coercion in OS 9.2.2 (AppleScript 1.7)
  • Index(es):
    • Date
    • Thread