• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Mail and AppleScript frustration (newbie)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Mail and AppleScript frustration (newbie)
      • From: has <email@hidden>
    • Re: Mail and AppleScript frustration (newbie)
      • From: "EU - Luca Pozzato" <email@hidden>
  • Prev by Date: Re: Accessing a file in a bundle
  • Next by Date: Re: How do you update a tracks info in Itunes with applescript
  • Previous by thread: re: xml
  • Next by thread: Re: Mail and AppleScript frustration (newbie)
  • Index(es):
    • Date
    • Thread