Hi,
I try to make a playlist in iTunes with all my tracks whose kind is not the ACC-format. (like MPEG, MOV, etc). I’ve recently made such script. This one actually makes a playlist with all tracks whose bit rate is greater then 193.
So for making my new script, I just typed over the whole thing, and adjusted the variables, etc. However, while my first script runs OK, my seconds script just won’t work. I get an error like this:
this is the script that works (the bit rate script):
set myString to day of (current date) & " " & ¬
month of (current date) & " " & ¬
year of (current date) & " (" & ¬
hours of (current date) & "-" & ¬
minutes of (current date) & "-" & ¬
seconds of (current date) & ")"
tell application "iTunes"
set myToHighBitRateTracks to every track whose bit rate > 193
set myPlaylist to make new playlist with properties {name:"To High Bitrate " & myString}
repeat with i in myToHighBitRateTracks
duplicate i to myPlaylist
end repeat
if (count every item of myPlaylist) is 0 then
delete myPlaylist
display dialog "Geen songs met te hoge Bit Rate."
end if
end tell
and this is the script that won’t work (the kind script):
set myString to day of (current date) & " " & ¬
month of (current date) & " " & ¬
year of (current date) & " (" & ¬
hours of (current date) & "-" & ¬
minutes of (current date) & "-" & ¬
seconds of (current date) & ")"
tell application "iTunes"
set NonACC to (every track whose kind does not contain "AAC")
set myPlaylist to (make new playlist with properties {name:"Non-ACC " & myString})
repeat with i in NonACC
duplicate i to myPlaylist
end repeat
if (count every item of myPlaylist) is 0 then
delete myPlaylist
display dialog "Geen songs die niet in het AAC-formaat staan"
end if
end tell
I really don’t see where the bug is, because I just typed it all over. I hope you can see it.
Thanks in advance,
ief2
PS.: I’m sorry for my English. I know I sometimes make some rubbish sentences, but I ask you to forgive me. I’m only 14 years old and I come from Belgium, so I speak dutch. If you don’t understand me, don’t hesitate to give a reply on that.
Model: iMac
Browser: Safari 531.9
Operating System: Mac OS X (10.6)