Re: Safari - email contents
Re: Safari - email contents
- Subject: Re: Safari - email contents
- From: Luther Fuller <email@hidden>
- Date: Mon, 3 Mar 2008 08:01:06 -0600
On Mar 2, 2008, at 3:38 PM, email@hidden wrote:
I would like to open a web page via applescript, then email that
web page. This works to create a new mail message with the contents
of the web page:
tell application "Safari"
email contents of document 1
end tell
My problem is that I can't figure out how to add an email address
to the outgoing message or change the subject line. I can get the
id of the outgoing message (I think I have the right one) but
adding the email address and changing the subject line is proving
elusive. Any help would be greatly appreciated.
I spent an hour or so picking at this yesterday evening. My
experience is the same as the OP. I did get this to work ...
tell application "Safari" to email contents of document 1
delay 4
tell application "Mail"
activate
-- new message is visible and contains correct html content
set currWin to window index 1
-- saving or modifying the new message unsuccessful
close currWin -- this works
end tell
My conjecture is that the new window is NOT yet a message, so you
can't do anything to it that you ought to be able to do to a message.
So, why not 'save as draft' first? You CAN do this manually, but I
can't find any command to do this in a script. I even tried using
Script Editor to record a manual 'save as draft', but nothing records.
Perhaps I have not yet read the dictionary correctly and will soon
stumble upon the correct code. (A sad commentary on the dictionary.)
But, I am beginning to come to the conclusion that someone forgot to
add something necessary to the dictionary and you just can't do that.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden