Jay Carr
07-01-2010, 03:36 AM
I'm trying to create an automator action that runs a script that deletes a specific song from the iTunes library (not just the file, but the XML reference in the iTunes lib as well.)
Basically, this is for an Automator Workflow "Folder Action" that allows me to export a 35 second clip from Ableton Live (music creation software) into a specific folder (called Ringtones) and then have that song turned into a ringtone and put into my iTunes library.
The Automation so far:
Step 1: Import Audio Files -- It takes the file out of the folder and converts it to .aac, importing it into the iTunes library at the same time.
Step 2: Copy Finder Items -- Puts the .m4a back into my desktop folder called Ringtones.
Step 3: Replace Text in Finder Item Names -- I use this to replace .m4a with .m4r so that I now have a ringtone.
Step 4: Applescript -- I need this script to remove the .m4a from the iTunes library. If it's not removed, the putting then importing the .m4r will not work, it simply recognizes it as the .m4a from before and doesn't add it to ringtones. If I delete the .m4a from the library manually, I can then import the .m4r as a ringtone, I just want it automated you see...
Step 5: Import Files into iTunes -- Puts the .m4r into iTunes (I think, haven't really gotten to this step yet...)
Any and all help is welcome, including a change in strategy if it is needed (ie., going all Applescript and all).
As a warning -- my understanding of AppleScript is rudimentary at best. But I'm willing to learn. That being said, I would appreciate it if someone simply gave me the script...
Basically, this is for an Automator Workflow "Folder Action" that allows me to export a 35 second clip from Ableton Live (music creation software) into a specific folder (called Ringtones) and then have that song turned into a ringtone and put into my iTunes library.
The Automation so far:
Step 1: Import Audio Files -- It takes the file out of the folder and converts it to .aac, importing it into the iTunes library at the same time.
Step 2: Copy Finder Items -- Puts the .m4a back into my desktop folder called Ringtones.
Step 3: Replace Text in Finder Item Names -- I use this to replace .m4a with .m4r so that I now have a ringtone.
Step 4: Applescript -- I need this script to remove the .m4a from the iTunes library. If it's not removed, the putting then importing the .m4r will not work, it simply recognizes it as the .m4a from before and doesn't add it to ringtones. If I delete the .m4a from the library manually, I can then import the .m4r as a ringtone, I just want it automated you see...
Step 5: Import Files into iTunes -- Puts the .m4r into iTunes (I think, haven't really gotten to this step yet...)
Any and all help is welcome, including a change in strategy if it is needed (ie., going all Applescript and all).
As a warning -- my understanding of AppleScript is rudimentary at best. But I'm willing to learn. That being said, I would appreciate it if someone simply gave me the script...