|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
Note that persistent IDs are completely unreliable in AppleScript. [...] AppleScript throws away the bottom twelve bits [...] different IDs can (and often do) appear as the same number in AS.
That's a very important warning.
However I find that (in practical situations) "completely" and "often" are slightly exaggerated here.
Suppose you've got 10,000 tracks in your iTunes library. Then since you are storing only 52 bits (which makes more than hundreds thousands of billions different numbers, 10^14+) instead of 64 two different IDs will appear the same with probability less than 1/10,000,000,000.
Dave Dribin wrote:
The 'persistent ID' property is in iTunes 6.0.2, but not in iTunes 6.0.1.
That's what Doug's AppleScript site says, too. Do you know this from looking at the 6.0.1 dictionary?
Persistent IDs are safe to use in C and in Python+appscript, however, as those correctly preserve the original 64-bit value. Not sure about Perl+Mac::Glue; you'd need to check.
I'll be calling from C, so this looks promising.
has -- http://freespace.virgin.net/hamish.sanderson/
_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
Visit the Apple Store online or at retail locations.
Copyright © 2011 Apple Inc. All rights reserved.