Re: Newbie apple mail quesion - Putting the Subject of the active email on the Clipboard
Re: Newbie apple mail quesion - Putting the Subject of the active email on the Clipboard
- Subject: Re: Newbie apple mail quesion - Putting the Subject of the active email on the Clipboard
- From: Adam Morris <email@hidden>
- Date: Wed, 6 Jan 2010 01:34:28 -0500
I've learned from previous attempts running from within a "perform mail action" handler that this handler runs in a different thread from most applescripts and so it wouldn't be surprising if it couldn't do anything system-wide like set the clipboard. That's the most I can make of it anyway; can't confirm but I suspect that's what's happening.
The other option is you could use FastScripts to make an applescript get the currently selected inbox item, the subject of that, and then set that to the clipboard. A downside to that though is that you don't have the automaticity offered by perform mail action, but I don't see how setting something to the clipboard in the middle of a script that's performed whenever you get a particular email to be particularly useful. I don't know your overall goal though.
brainysmurf a.k.a Adam
using terms from application "Mail"
on perform mail action with messages theSelectedMessages
tell application "Mail"
set eachMessage to item 1 of theSelectedMessages
set theSubject to subject of eachMessage
end tell
end perform mail action with messages
end using terms from
set the clipboard to theSubject
_______________________________________________
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