Mail and AppleScript frustration (newbie)
Mail and AppleScript frustration (newbie)
- Subject: Mail and AppleScript frustration (newbie)
- From: Aurélien Hugelé <email@hidden>
- Date: Fri, 11 Jan 2008 12:45:59 +0100
Hi list!
I'm new to AppleScript, but I feel it can be very powerful to
integrate my app with Apple iApps.
I have encountered a lot a frustration lately with Mail.app scripting.
What I want to achieve is very basic, but I can't find a way to solve
the problem.
I would like to access some specific messages in Mail.app.
I've looked at tons of example and suceeded to access *selected*
messages, but not to a specific message by its "id"
Look at this code:
tell application "Mail"
set theMessage to message 1 of mailbox "INBOX" of account "Support
OD" of application "Mail"
end tell
returns me (in Script Editor):
message id 399989 of mailbox "INBOX" of account "Support OD" of
application "Mail"
now suppose i've stored somewhere the *REAL* id of the message
(399989) somewhere (in fact my cocoa app uses spotlight to get the
message and store this real id in a database), I can't get the
corresponding message back (by id) using AppleScript!!!
why
tell application "Mail"
set theMessage to message 399989 of mailbox "INBOX" of account
"Support OD" of application "Mail"
end tell
or
tell application "Mail"
set theMessage to message 399989
end tell
does not work ?
There seems to be something in AppleScript or Mail that convert ids!?
Basically, I want to get messages using their *real* ids, the ids that
are returned by Mail.
Anyone know how can I achieve that?
Thanks for helping a beginner :)
Aurélien,
Objective Decision Team
_______________________________________________
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