• 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: How do you test if a property is empty
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do you test if a property is empty


  • Subject: Re: How do you test if a property is empty
  • From: "Stockly, Ed" <email@hidden>
  • Date: Mon, 19 Jan 2009 15:05:11 -0800
  • Thread-topic: How do you test if a property is empty


> I believe something like this should work in general, not just for iTunes
tracks:
>
> set current_val to the missing value
> try
>    set current_val to some_prop of some_object
> end try
>

That does work in many cases, but I wouldn't say it works "in general"

You really need to look at each property of each object in the application
to see what it returns when it hasn't been set  or if it has no value.

For example, there are several itunes track settings that return an empty
string if they haven't been set.

Missing value seems to consistently work for itunes properties based on
dates that haven't been set; 0 works for number based properties and ""
works for text based properties.

I wouldn't count on that being consistent across all apps.

HTH,

ES

 _______________________________________________
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

  • Prev by Date: Re: Creating, modifying and formatting a pivot table with AS in Excel 2008
  • Next by Date: RE: How do you test if a property is empty
  • Previous by thread: Re: How do you test if a property is empty
  • Next by thread: RE: How do you test if a property is empty
  • Index(es):
    • Date
    • Thread