Selecting tracks in itunes?
Greetings!
Selecting tracks in iTunes, using AppleScript, remains a mystery to me. For example, this short script:
tell application "iTunes"
set t to first track of current playlist
selectt
end tell
I think the script is obvious, but I get this error instead:
iTunes got an error: URL track id 896882 of user playlist id 896879 of source id 76 doesn’t understand the select message.
(well, if the select command is not made for selecting tracks, what else in iTunes?)
Thinking it may be because iTunes expect a list, I then try this:
tell application "iTunes"
set t to {first track of current playlist}
selectt
end tell
But the same error happens.
Finally, out of idea, I try this:
tell application "iTunes"
set t to {first track of current playlist}
set selection to t
end tell
I get this, now:
iTunes got an error: Unknown object type.
(in the “selection” line).
I've also tried things like this:
tell application "iTunes"
set t to selection
selectt
end tell
To be sure the data is the expected type, but the same error happens.
Now, I'm really out of idea. I have over 8'000 files to sort, and I made a script to get every duplicate track, but now I can't select them (I can only uncheck the checkbox, for visual feedback, but it's far from ideal).
I can't think it's not possible to select some tracks in iTunes. What else might I try?
TIA
Mac Pro, Mac OS X (10.7.2)