• 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 Recipients
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail Recipients


  • Subject: Re: Mail Recipients
  • From: Luther Fuller <email@hidden>
  • Date: Sun, 09 Dec 2012 15:35:52 -0600

An interesting note on this problem.

My original script was …

repeat with i from 1 to (count items of toList)
if i > 2 then exit repeat
item i of toList
try
((name of the result) as Unicode text) & " <" & ((address of the result) as Unicode text) & ">"
on error
"<" & ((address of the result) as Unicode text) & ">"
end try
set toShortList to toShortList & {the result}
end repeat

This worked in Snow Leopard which I was using until late October when I got a new Mac mini and began using Lion. I have checked my mail archives and the text "missing value" first appeared in late October. The reason seems to be that the script above no longer errors in Lion.

I replaced the 'try error' block with this …

repeat with i from 1 to (count items of toList)
if i > 2 then exit repeat
(item i of toList)
{(name of the result), "<" & ((address of the result) as Unicode text) & ">"}
if item 1 of the result = missing value then
item 2 of the result
else
(item 1 of the result as Unicode text) & space & (item 2 of the result)
end if
set toShortList to toShortList & {the result}
end repeat

fixing the problem by avoiding 'try error'.
This seems to reinforce recent warnings about using 'try error'. But is it a bug?
A Mail bug or an AppleScript bug?


 _______________________________________________
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 Recipients
      • From: Christopher Stone <email@hidden>
    • Re: Mail Recipients
      • From: "koenig.yvan" <email@hidden>
References: 
 >Mail Recipients (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: Mail Recipients
  • Next by Date: Re: Mail Recipients
  • Previous by thread: Re: Mail Recipients
  • Next by thread: Re: Mail Recipients
  • Index(es):
    • Date
    • Thread