ETA:
YAY!!!
So.
I am trying to burn a playlist from iTunes (Mac OS X 10.5.6, iTunes 8.1.1 (10)), and no matter how I try to burn it, either directly in iTunes, or dragging to a DVD image and choosing "burn disc", or using Toast, it reorders the playlist alphabetically by song title. I have tried everything to get it to burn in the order I've put it in.
I found this nifty Automator script, that *looks* like it should work.
It looks like this:
1. Automator » Ask for Confirmation (This may be Leopard only.). This asks if the user wishes to continue, since it may take a while to run.
2. iTunes » Get Selected iTunes Items. This will select all songs that you've selected in iTunes, such as the songs in a playlist.
3. Finder » Copy Finder Items. This will copy the song files to the Finder. Select a default folder, such as the Desktop. Check the "Show This Action When the Workflow Runs" box under Options to allow you to choose a folder to export a particular playlist into.
4. Finder » Rename Finder Items (Make Finder Item Names Sequential). You should say Make Sequential in the top drop-down, and then select Add number to existing item name. Select Place number before name, Start numbers at 1, separated by dash (or underscore, etc), and make all numbers X digits long. X should be 1 to 3, depending on how many songs you have -- three digits will allow you to export more than 100 songs.
5. Save your workflow to the scripts folder, or as an application to add to your Dock.
When run, the workflow will first copy the files to the selected Finder folder, then rename them. You can then burn the folder -- and any other folders of exported playlists -- to a disc, using the Finder or Toast. Problem solved!
********
I set it up exactly as it's listed here. I went into iTunes, clicked on my playlist, and selected the tracks. When the script runs, "Get Selected Items" gives conflicting messages. On one hand, it takes no time at all to import the 116 mp3 files I have selected in my playlist, and they show up in the results window for "Get Selected Items". Yet at the same time, in the Log window, the yellow warning triangle appears and says "The action "Get Selected Items" was not supplied with the required data". Directly under that in the log, it says "Get Selected Items completed," with a green checkmark next to it. Meanwhile, it only took 67 seconds to "Get Selected Items" with its green checkmark, and "Converting iTunes items" is the one with the grey circle with the arrow in it (indicating it's currently running), yet the progress bar at the bottom of the Automator window still say "Get Selected Items" and the circle of gray bars is still spinning, twenty minutes later.
So then, I asked on the Apple discussion forums, both under Automator and iTunes, and someone had written an AppleScript to do exactly what the Automator script was supposed to do. Someone else had replied to that post saying it worked brilliantly, so I tried it too.
I'm using dashes to show the beginning and end of the script; obviously they are not *part* of the script.
-----------------------------------------------
(* copy and rename iTunes items *)
if application "iTunes" is not running then
display alert "iTunes is not running" message "Please activate iTunes and select items."
return
end if
-- set up a few things
choose folder with prompt "Choose a folder to copy the selected iTunes items into:" default location (path to desktop)
set DestinationFolder to the result
set {PrefixNumber, TrackLocations} to {0, {}}
-- get filepaths of the selected iTunes items
tell application "iTunes" to repeat with SomeTrack in (get the selection)
try -- skip items that are not file tracks (no location)
set the end of TrackLocations to location of SomeTrack
end try
end repeat
-- copy and rename
repeat with SomeFile in TrackLocations
set PrefixNumber to text 2 thru -1 of ((1000 + PrefixNumber + 1) as text) -- prefix with leading zeros
tell application "Finder"
set NewName to PrefixNumber & "-" & (get name of SomeFile)
set the name of (duplicate SomeFile to DestinationFolder) to NewName
end tell
end repeat
tell application "Finder" to reveal DestinationFolder
-----------------------------------------------
I have a feeling that the reason it doesn't work is that there are variables in here that I'm supposed to change to names of files and folders on my computer, but I don't know which they are.
Can anyone help?
no subject
Date: 2009-04-18 04:42 am (UTC)Picture to help.
http://farm4.static.flickr.com/3372/3451229497_de8f6185ff.jpg?v=0
hopefully that's helpful. I know it took me forever to figure it out.
no subject
Date: 2009-04-18 04:45 am (UTC)no subject
Date: 2009-04-18 05:24 am (UTC)no subject
Date: 2009-04-18 05:28 am (UTC)Dammit.
no subject
Date: 2009-04-18 05:32 am (UTC)no subject
Date: 2009-04-18 05:36 am (UTC)no subject
Date: 2009-04-18 05:41 am (UTC)Hm. So, looks like we need to get the POSIX path of each item. I'll play with it tomorrow, see if I can get it to work.
no subject
Date: 2009-04-18 05:43 am (UTC)But thank you for taking the time to look at it tomorrow!
no subject
Date: 2009-04-18 03:09 pm (UTC)no subject
Date: 2009-04-18 06:19 am (UTC)no subject
Date: 2009-04-18 03:07 pm (UTC)I have to run, but when I get back I'll tell you how to implement the script and you will be JOYOUS!
no subject
Date: 2009-04-18 09:44 am (UTC)1) Open iTunes
2) Select music
3) Run script
-----
tell application "System Events" to set open_applications to ("iTunes")
choose folder with prompt "Choose a folder to copy the selected iTunes items into:" default location (path to desktop)
set DestinationFolder to the result
set {PrefixNumber, TrackLocations} to {0, {}}
tell application "iTunes" to repeat with SomeTrack in (get the selection)
try
set the end of TrackLocations to location of SomeTrack
end try
end repeat
repeat with SomeFile in TrackLocations
set PrefixNumber to text 2 thru -1 of ((1000 + PrefixNumber + 1) as text)
tell application "Finder"
set NewName to PrefixNumber & "-" & (get name of SomeFile)
set the name of (duplicate SomeFile to DestinationFolder) to NewName
end tell
end repeat
tell application "Finder" to reveal DestinationFolder
----
no subject
Date: 2009-04-18 02:57 pm (UTC)What is all of this "SomeTrack" and (get the selection) -- should I be renaming them things specific to my computer?
no subject
Date: 2009-04-18 03:03 pm (UTC)*I KISS YOU*
omg omg omg
no subject
Date: 2009-04-18 03:08 pm (UTC)no subject
Date: 2009-04-18 03:12 pm (UTC)no subject
Date: 2009-04-18 03:16 pm (UTC)I replaced
if application "iTunes" is not running then
display alert "iTunes is not running" message "Please activate iTunes and select items."
return
end if
with
tell application "System Events" to set open_applications to ("iTunes")
I think it's entirely possible you could just lose that line altogether and just make sure you have iTunes open before running the script, but I haven't tested that
no subject
Date: 2009-04-18 03:22 pm (UTC)BAH.
no subject
Date: 2009-04-18 03:26 pm (UTC)no subject
Date: 2009-04-18 03:27 pm (UTC)(* copy and rename iTunes items *)
if application "iTunes" is not running then
display alert "iTunes is not running" message "Please activate iTunes and select items."
return
end if
-- set up a few things
choose folder with prompt "Choose a folder to copy the selected iTunes items into:" default location (path to desktop)
set DestinationFolder to the result
set {PrefixNumber, TrackLocations} to {0, {}}
-- get filepaths of the selected iTunes items
tell application "iTunes" to repeat with SomeTrack in (get the selection)
try -- skip items that are not file tracks (no location)
set the end of TrackLocations to (the location of SomeTrack as string)
end try
end repeat
-- copy and rename
repeat with SomeFile in TrackLocations
set PrefixNumber to text 2 thru -1 of ((1000 + PrefixNumber + 1) as text) -- prefix with leading zeros
tell application "Finder"
set NewFile to (duplicate SomeFile to DestinationFolder)
set NewName to PrefixNumber & "-" & (the name of NewFile)
set the name of NewFile to NewName
end tell
end repeat
tell application "Finder" to reveal DestinationFolder
(Edited to post without a line specific to my computer which wasn't necessary anyway. And now I'm going to breakfast.)