• 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
Re: Mail: Message Reference Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail: Message Reference Problem


  • Subject: Re: Mail: Message Reference Problem
  • From: Axel Luttgens <email@hidden>
  • Date: Tue, 14 Jul 2009 22:00:22 +0200

Le 14 juil. 09 à 20:25, Christopher Stone a écrit :

Hey Folks,

This works fine:

tell application "Mail"
	tell message viewer 1
		set m to item 1 of (get selected messages)
		tell m
			set mID to id
			set mBox to its mailbox
		end tell
	end tell
end tell

But this fails to compile with this error: Expected end of line, etc. but found number.

tell application "Mail"
message id 20260 of mailbox "INBOX" of account "someAccount" of application "Mail"
end tell


What's up with that?

An oddity, perhaps? ;-)

Class "message" specifies following properties:

	id (integer, r/o) : The unique identifier of the message
	message id (text, r/o) : The unique message ID string

I guess that one is thus facing a terminology ambiguity...
As a workaround, this one works:

tell application "Mail"
messages of mailbox "INBOX" of account "someAccount" whose id is 597180
end tell


Note that:

	tell application "Mail"
		messages of message viewer 1 whose id is 597158
	end tell

works as well (that's the nice thing with true ids...).

Hmmm... a good evening anyway,
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
References: 
 >Mail: Message Reference Problem (From: Christopher Stone <email@hidden>)

  • Prev by Date: Mail: Message Reference Problem
  • Next by Date: Re: Simple apple script - Beginner Problem
  • Previous by thread: Mail: Message Reference Problem
  • Next by thread: Opening and modifying a .plist file with System Events
  • Index(es):
    • Date
    • Thread