• 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: Some Message Viewer Whose Index Is 1 and Mail 7.2 (1874) in 10.9.2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some Message Viewer Whose Index Is 1 and Mail 7.2 (1874) in 10.9.2


  • Subject: Re: Some Message Viewer Whose Index Is 1 and Mail 7.2 (1874) in 10.9.2
  • From: Christopher Stone <email@hidden>
  • Date: Thu, 27 Feb 2014 20:20:56 -0600

On Feb 27, 2014, at 17:33, Terrazas, Enrique <email@hidden> wrote:
Oops!  Sorry, your code worked.  I replied with the result from your code.  
______________________________________________________________________

Hey Enrique,

Aha!

I didn't understand, because:

tell application "Mail"
message viewer id 1 of application "Mail"
end tell

Is also syntactically correct.

In general it's a good idea to indicate the result in some way to helps avoid misunderstandings.

--> The_Result

Or some such.

I opened up 2 viewers, each with a different mailbox selected, and your code produces a result, but both produce exactly the same result no matter which viewer I select … odd.

They should not be the same...

tell application "Mail"
some message viewer whose index is 1
end tell

# First message viewer:

--> message viewer id 1 of application "Mail"

# Second message viewer:

--> message viewer id 24 of application "Mail"

More detail:

tell application "Mail"
set fMsgVwr to some message viewer whose index is 1
{name, it} of fMsgVwr
end tell

# Pretty Print courtesy of Script Debugger:

# First message viewer:

{
"Today (3 messages)", 
message viewer id 1 of application "Mail"
}

# Second message viewer:

{
"Yesterday", 
message viewer id 24 of application "Mail"
}

We had a long discussion about this hackish method of getting the FMV, and we pretty much decided that somehow Mail was returning the message viewer whose window's index was 1.

That's very counterintuitive, and Apple should be ashamed of themselves for not providing window subclasses of Message-Views, Message, and Outgoing-Message.

In any case thanks for the input.  :)

--
Take Care,
Chris


 _______________________________________________
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: 
 >Some Message Viewer Whose Index Is 1 and Mail 7.2 (1874) in 10.9.2 (From: Christopher Stone <email@hidden>)
 >Re: Some Message Viewer Whose Index Is 1 and Mail 7.2 (1874) in 10.9.2 (From: "Terrazas, Enrique" <email@hidden>)

  • Prev by Date: Re: Some Message Viewer Whose Index Is 1 and Mail 7.2 (1874) in 10.9.2
  • Next by Date: Re: Some Message Viewer Whose Index Is 1 and Mail 7.2 (1874) in 10.9.2
  • Previous by thread: Re: Some Message Viewer Whose Index Is 1 and Mail 7.2 (1874) in 10.9.2
  • Next by thread: Re: Some Message Viewer Whose Index Is 1 and Mail 7.2 (1874) in 10.9.2
  • Index(es):
    • Date
    • Thread