Re: Applescript: referring to selected email in Mail
- From: Ingvar Nedrebo <inn@xxxxxxxxxx>
- Date: Sun, 12 Feb 2006 15:39:27 +0000
In article <1hanbej.g6dswt14ncbaaN%me3@xxxxxxxxxxx>, zoara
<me3@xxxxxxxxxxx> wrote:
Okay, so this should be dead simple but I just can't work it out, and
nowhere on the web seems to have a script that does this.
"dead simple" is never a phrase that comes to mind when I'm dealing
with AppleScript.
How do I refer to a message (and/or number of messages) that are
selected in Mail? I have a bunch of actions I want to perform on a given
email(s) but can't refer to them! For example's sake, let's say I want
to display a dioalog saying who the email is from...
I got this to work:
set msgs to selection
repeat with this_message in msgs
set adr to extract address from sender of this_message
display dialog "message is from " & adr
end repeat
I tried "repeat with this_message in selection", which didn't work. I
have no idea why.
[snip]
There's something about Applescript syntax that completely flummoxes me;
I've downloaded manuals and sample code but I Just Don't Get It. Argh.
Ditto.
i.
--
Remove all numbers to reply.
.
- Follow-Ups:
- References:
- Applescript: referring to selected email in Mail
- From: zoara
- Applescript: referring to selected email in Mail
- Prev by Date: Re: internet banking experiences on mac?
- Next by Date: Re: Powerbook G4 tools
- Previous by thread: Applescript: referring to selected email in Mail
- Next by thread: Re: Applescript: referring to selected email in Mail
- Index(es):
Relevant Pages
|