• 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: Help Testing a Mail Script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help Testing a Mail Script


  • Subject: Re: Help Testing a Mail Script
  • From: Axel Luttgens <email@hidden>
  • Date: Fri, 28 Sep 2012 23:38:45 +0200

Le 28 sept. 2012 à 22:15, Christopher Stone a écrit :

> Hey Folks,
>
> This little bit of code has worked well for years.
>
> tell application "Mail"
> 	tell (some message viewer whose index is 1)
> 		set selected messages to {}
> 	end tell
> end tell
>
> But I seem to have a problem on Mountain Lion.
>
> If I select some messages in a mailbox and run the script they are de-selected as they should be.
>
> BUT if I immediately repeat the process the script throws an error on my machine:
>
>   Mail got an error: Container specified was an empty list.
>
> Would someone mind testing this for me?

Hello Christopher,

Don't have ML installed here, so I can't tell; still working fine on Lion, but I guess that info isn't of very much help... ;-)

But I take the opportunity to ask about an increasing usage I could observe here, which I don't quite understand.

Why such a convoluted access:

	tell (some message viewer whose index is 1)

and not just:

	tell front message viewer

or just:

	tell message viewer 1

?

A message viewer is an application's element, so there is a possibly 1st, possibly a 2d, even a 3d message viewer, and so on... Why not just go thru the direct way?

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


  • Follow-Ups:
    • Re: Help Testing a Mail Script
      • From: Christopher Stone <email@hidden>
References: 
 >Help Testing a Mail Script (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: Help Testing a Mail Script
  • Next by Date: Re: Help Testing a Mail Script
  • Previous by thread: Re: Help Testing a Mail Script
  • Next by thread: Re: Help Testing a Mail Script
  • Index(es):
    • Date
    • Thread