Re: Saving a document in Safari
Re: Saving a document in Safari
- Subject: Re: Saving a document in Safari
- From: John Delacour <email@hidden>
- Date: Mon, 10 Feb 2003 00:44:11 +0000
On Sunday, February 9, 2003, at 11:03 PM, Rick Bargerhuff alias cougar
wrote:
Why is it so difficult even for an experienced AppleScripter to save a
document using AppleScript? I'm trying to code a script that will
save the front most document of Safari to the desktop. No matter what
syntax combination I try, I get an error.
Try this:
set f to "" & (path to desktop) & "junk.html"
tell application "Safari" to copy the source of the front document to s
set s to s as text
open for access file f with write permission
write s to file f
close access file f
tell application "TextEdit"
open {alias f}
activate
end tell
JD
_______________________________________________
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.