• 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: What's the difference between '{}' in Applescript, and '{}' in ASObC?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What's the difference between '{}' in Applescript, and '{}' in ASObC?


  • Subject: Re: What's the difference between '{}' in Applescript, and '{}' in ASObC?
  • From: Ron Reuter <email@hidden>
  • Date: Thu, 30 Jul 2015 08:41:23 -0500

Hunh? Aside from the difficulty I'm having in parsing the question (what the heck is "empty mail" and "non-email"?)

set my currentMailItem to {}

if (count of (mail attachments of (mycurrentMailItem))) is 0 and (mycurrentMailItem) ≠ {} then my playGlass()

The first condition is always true, so the check for empty list is always short circuited, so of course it is ignored.

Suggestion: in trying to understand any code, first simplify it and examine intermediate results to see where it goes right or wong. Break that conditional into two statements or more and log the results.

-- Ron


On Jul 30, 2015, at 07:48, Brian Christmas <email@hidden> wrote:

if (count of (mail attachments of (my currentMailItem))) is 0 and (my currentMailItem) ≠ {} then my playGlass()
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: What's the difference between '{}' in Applescript, and '{}' in ASObC?
      • From: Brian Christmas <email@hidden>
References: 
 >What's the difference between '{}' in Applescript, and '{}' in ASObC? (From: Brian Christmas <email@hidden>)

  • Prev by Date: Re: What's the difference between '{}' in Applescript, and '{}' in ASObC?
  • Next by Date: Re: What's the difference between '{}' in Applescript, and '{}' in ASObC?
  • Previous by thread: Re: What's the difference between '{}' in Applescript, and '{}' in ASObC?
  • Next by thread: Re: What's the difference between '{}' in Applescript, and '{}' in ASObC?
  • Index(es):
    • Date
    • Thread