Re: Saving a document in Safari
Re: Saving a document in Safari
- Subject: Re: Saving a document in Safari
- From: Michelle Steiner <email@hidden>
- Date: Tue, 11 Feb 2003 15:18:57 -0700
On Tuesday, February 11, 2003, at 01:27 PM, John Delacour wrote:
You're forgetting that we're living in a brave new world, Michelle.
The dictionary is quite clear in requiring a text pathname, an that
pathname must, of course be a Unix pathname.
Why "of course"?
I know that it was clear in requiring a text pathname, but when text
didn't work, I tried other things, just in case the error was in the
dictionary. It has been known to happen before.
set f to POSIX path of ("" & (path to desktop) & "junk.html")
tell app "Safari" to save front document in f as text
BTW, the file name has to end with ".html", or you get an error, which
means that if you want to use the window's name, you have to do
something like this:
tell application "Safari"
set foo to name of front window
set f to POSIX path of ("" & (path to desktop) & foo & ".html")
save front window in f
end tell
BTW, "save front window" appears to work just as well as "save front
document"
I think that we've (you've) solved the OP's original problem now.
--Michelle
--
"There's some good in the world, Mr. Frodo, and it's worth fighting
for."
_______________________________________________
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.