iMeowbot said:There is a track number field in the iTunes database. If you rip music from vinyl or tape, or from a CD that isn't in CDDB, it won't automatically be filled in. So, if you want to play that album in its original order, you have to fill in the numbers.
A little program to help with that task makes oodles of sense.
tell application "iTunes"
if selection is not {} then
copy (track number of selection) to theTrackCount
copy selection to theTracks
else
return
end if
end tell
copy theTrackCount's length to theTrackCount
repeat with i from 1 to theTrackCount
tell application "iTunes"
copy (a reference to item i of theTracks) to theTrack
copy theTrackCount to track count of theTrack
copy i to track number of theTrack
end tell
end repeat
Gee, thanks for spoiling months of intense research and developmentmduser63 said:Here you go:
Code:tell application "iTunes" if selection is not {} then copy (track number of selection) to theTrackCount copy selection to theTracks else return end if end tell copy theTrackCount's length to theTrackCount repeat with i from 1 to theTrackCount tell application "iTunes" copy (a reference to item i of theTracks) to theTrack copy theTrackCount to track count of theTrack copy i to track number of theTrack end tell end repeat
hob said:Gee, thanks for spoiling months of intense research and development
But seriously, thank you! That's great, I can start looking at it and poking it around and stuff
Is there a way of integrating Applescript into a GUI?
Need a hint? XCode.bousozoku said:Yes, there is. Enjoy your 10 minutes of research.
For a gui for AppleScript? What other way is there... AppleScript studio?bousozoku said:That works, too.
slooksterPSV said:For a gui for AppleScript? What other way is there... AppleScript studio?