Re: Saving Safari documents as html?
Re: Saving Safari documents as html?
- Subject: Re: Saving Safari documents as html?
- From: David Duncan <email@hidden>
- Date: Fri, 6 Jan 2006 13:39:40 +1100
Nigel Garvey wrote at 5 Jan 2006 15:02:53 +0000
I think you're supposed to save the document rather than the window,
though the effect seems to be the same, in Safari 2.0.2. Strange. (I
can't tell about images because my Tiger machine's not connected to
the
Net.) If the file's renamed after it's saved, Safari recognises it
as an
HTML file rather than a download file:
tell application "Safari"
activate
set fileName to (name of document 1) & ".html"
set savePath to (path to desktop as Unicode text) & fileName
save document 1 in file savePath
end tell
tell application "Finder"
if file (savePath & ".download") exists then
set name of file (savePath & ".download") to fileName
end if
end tell
This worked perfectly. Thank you, Nigel, for such excellent advice.
David Duncan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden