Re: Send outgoing message error from Mail.app
Re: Send outgoing message error from Mail.app
- Subject: Re: Send outgoing message error from Mail.app
- From: Alan Kimelman <email@hidden>
- Date: Sun, 31 Jan 2010 14:34:37 -0800
Axel,
Your UI script solved the problem of sending an outgoing message that had been generated by Safari's applescript command to email contents.
Thank you for your help.
Along a similar vein, I am having difficulty changing the name of the subject in the outgoing message. The script you suggested, along with other attempts I have made to change outgoing message's subject, have failed to change the name.
The method employed by Safari applescript is to make the subject of the outgoing message the same text or value as the title of the HTML page in Safari . In your script example that would be N.
How might I find a method to change the subject in the outgoing message?
On Jan 29, 2010, at 1:17 AM, Axel Luttgens wrote:
> Le 29 janv. 2010 à 09:13:27, Alan Kimelman a écrit :
>
>> Axel,
>>
>> I tried the UI method but the UI method does not allow applescript to identify a specific outgoing message to send, at least from my attempts.
>> In that manner, it appears that UI scripting is disabled in the manner that you described so that privacy or security cannot be breached with a careless Send command. In fact, I experienced much difficulty targeting a Send command via UI to any specific outgoing message in Mail. Were you able to obtain more precision via UI scripting of Send?
>
> Hello Alan,
>
> Following code, very quick and dirty, and relying on lots of assumptions and defaults, seems to do the job here:
>
>
> tell application "Safari"
> tell front window
> tell current tab
> set N to name
> email contents
> end tell
> end tell
> end tell
>
> tell application "Mail"
> tell first outgoing message
> make new to recipient with properties {address:"email@hidden"}
> end tell
> end tell
>
> -- Shouldn't be needed in this case.
> tell application "Mail" to activate
>
> tell application "System Events"
> tell application process "Mail"
> tell window N
> tell first tool bar
> tell button "Envoyer" -- to be localized
> click
> end tell
> end tell
> end tell
> end tell
> end tell
>
>
> HTH,
> Axel
>
_______________________________________________
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