Alright, I have the following script, which operates on iTunes tracks that have no ID3 tags, and whose names are numbers:
However, it fails on line 12 with a strange error message, complaining about being unable to convert something of some weird class to string. Anyone know why this isn't working?
Code:
tell application "iTunes"
if selection is not {} then
set sel to selection
else
display dialog "You must select some tracks first..." buttons {"Cancel"} default button 1 with icon 2 giving up after 15
end if
set oldfi to fixed indexing
set fixed indexing to true
repeat with aTrack in sel
set theName to do shell script "cat /Users/wrldwzrd89/Documents/Computers/UNIX/Scripts/VGMix/data/autotags/songname/" & aTrack & ".songname"
set theArtist to do shell script "cat /Users/wrldwzrd89/Documents/Computers/UNIX/Scripts/VGMix/data/autotags/artist/" & aTrack & ".artist"
set theAlbum to do shell script "cat /Users/wrldwzrd89/Documents/Computers/UNIX/Scripts/VGMix/data/autotags/album/" & aTrack & ".album"
tell aTrack
set name to theName
set artist to theArtist
set album to theAlbum
set comment to "www.vgmix.com"
set genre to "Game"
end tell
end repeat
set fixed indexing to oldfi
try
if frontmost is true then display dialog "Done!" buttons {"Thanks"} ¬
default button 1 with icon 1 giving up after 15
end try
end tell
However, it fails on line 12 with a strange error message, complaining about being unable to convert something of some weird class to string. Anyone know why this isn't working?