Re: Saving web pages in Safari, and ideas on creating persistent, searchable web archives
Re: Saving web pages in Safari, and ideas on creating persistent, searchable web archives
- Subject: Re: Saving web pages in Safari, and ideas on creating persistent, searchable web archives
- From: John Baltutis <email@hidden>
- Date: Sat, 12 Apr 2003 18:29:13 -0700
On 4/12/03, John Delacour <email@hidden> wrote:
>
>
At 4:50 pm -0400 12/4/03, Jeff Porten wrote:
>
>
>What's the syntax to tell Safari to save a web page with a
>
>particular name, at a particular Finder location, in HTML format?
>
>Have tried several different syntaxes with no luck.
>
>
Try this
>
>
set d to "1/1"
>
set f to paragraph 2 of "
>
" & (path to "cusr")&"Safari_" & ((current date)-(get date d)) &".html"
>
set my text item delimiters to {"http://"}
>
tell app "Safari" to set s to source of front document
>
open for access file f with write permission
>
write "" & s to file f
>
close access file f
>
tell app "Finder"
>
activate
>
reveal file f
>
end
FYI. With Safari opened on this page
<
http://www.macupdate.com/info.php/id/9503>, ran your script in SE 1.9,
with the event log window open, and got this error from the event log:
--> Safari got an error: An error of type -20013 has occurred.
and an error box stating: "Could not write to the Event Log because the
text would be longer than its maximum possible length."
What is the maximum possible length entry for the event log? Is the answer
in the ASLG?
BTW, the script works when the event log isn't open.
_______________________________________________
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.