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: Sat, 30 Jan 2010 00:44:16 -0800
Axel,
The UI method work-around solves the problem. Thanks.
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