iTunes object specifier (specified by a test) – relevance of order of operands in boolean conjunction?

Thanks for the nice suggestion! Of course, as you noted, it’s missing a bunch of AS properties, among them (maybe not surprisingly) the only recently added work/movement tags. Plus it’s read-only so you’d still have to switch to Apple Events at some point if you wanted to also modify the files, I guess, although that might not be too much trouble. I imagine this could certainly come in handy.

This appears to be FIXED as of iTunes 12.6.1 !! Yay! :grinning:

tell application "iTunes"
count every track whose composer ≠ "" and work ≠ ""
	--> 3734
count every track whose work ≠ "" and composer ≠ ""
	--> 3734
end tell

Thanks for sharing.

So does all this boil down to simply an iTunes bug, and not a bug/design flaw with AppleScript whose clause?

That’s what it looks like. Unless you consider it a flaw in the Apple Event system that reordering the operands in this example would be able to make a difference in the first place when the expressions should always be logically equivalent . I originally assumed the application would basically be given an unordered set there and so couldn’t rely on a certain order anyway, but as it appears to be an ordered list the order can, depending on the application any any bugs it may contain, apparently make a difference.