• 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: set understanding to (get explanation)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: set understanding to (get explanation)


  • Subject: Re: set understanding to (get explanation)
  • From: Christopher Nebel <email@hidden>
  • Date: Mon, 7 Jul 2008 13:43:32 -0700

On Jul 3, 2008, at 10:23 AM, Luther Fuller wrote:

While fixing an error in another script, I ran the following experiment to see what would happen.

tell application "Mail"
activate
if (count message viewers) = 0 then make new message viewer
set frontViewer to (some message viewer whose index is 1)
set selected mailboxes of frontViewer to {trash mailbox}
--
set visible messages of frontViewer to (get messages of frontViewer) -- unthreads the viewer, if threaded
delay 3
set visible messages of frontViewer to (messages of frontViewer) -- rethreads the viewer, if threaded
end tell
beep


If your trash mailbox is not "Organized by Thread", you will not see anything. If it is threaded, you will see it become unthreaded for 3 seconds. Notice that the two 'set visible ...' lines differ by only one word, namely 'get'.

Who has an explanation?


The fact that Mail behaves differently might be considered a bug in Mail, but as for why they *are* different, see the AppleScript Language Guide's discussion of "get": <http://developer.apple.com/documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_cmds.html#//apple_ref/doc/uid/TP40000983-CH216-SW56 >. Also, watch the event log for the two commands -- observe the difference.


--Chris Nebel AppleScript Engineering

_______________________________________________
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: set understanding to (get explanation)
      • From: Luther Fuller <email@hidden>
    • Find mail by subject and get content to clipboard
      • From: Elijah Samuels <email@hidden>
References: 
 >set understanding to (get explanation) (From: Luther Fuller <email@hidden>)

  • Prev by Date: RE: Simple text question
  • Next by Date: Re: Simple text question
  • Previous by thread: set understanding to (get explanation)
  • Next by thread: Find mail by subject and get content to clipboard
  • Index(es):
    • Date
    • Thread