Trying to write Automator action for iTunes

Discussion in 'Mac Apps and Mac App Store' started by silvine, May 14, 2009.

  1. silvine macrumors member

    Joined:
    May 22, 2008
    #1
    Hi,

    I am trying to write an Automator action that will select a folder on the desktop, scan it for songs, add them to itunes and then delete the folder.

    Any ideas??
     
  2. hobbbz macrumors 6502a

    hobbbz

    Joined:
    Mar 8, 2005
    #2
    Why would you want to scan the folder for songs then delete it?
    I would assume any folder you have only contains songs otherwise you wouldn't want to delete it after the MP3s got added to iTunes.
     
  3. silvine thread starter macrumors member

    Joined:
    May 22, 2008
    #3
    i have itunes set up to automatically copy files to the music library. This means when i import the folder to itunes, the folder and the contents goes in the recycle bin after the import

    I want automate these steps..
     
  4. hobbbz macrumors 6502a

    hobbbz

    Joined:
    Mar 8, 2005
    #4
    Something like this?
     

    Attached Files:

  5. silvine thread starter macrumors member

    Joined:
    May 22, 2008
    #5
    That looks a lot like what I'm trying to do. How do I change it so I can pick any folder on my desktop, add that folder and then delete the folder?

    EDIT: I can get it to add any folder I select to iTunes but it won't delete the folder after the finder plugin runs.
     
  6. hobbbz macrumors 6502a

    hobbbz

    Joined:
    Mar 8, 2005
    #6
    gotta use the variables, have it ask for folder then turn that into a variable and use the same variable to delete
     
  7. silvine thread starter macrumors member

    Joined:
    May 22, 2008
    #7
    It works great in Automator. However, when I save it as an application it won't delete the folder. Any ideas?
     
  8. silvine thread starter macrumors member

    Joined:
    May 22, 2008
    #8
    I've uploaded my application, which can be opened in Automator, if anyone wants to take a look?? :confused:
     

    Attached Files:

  9. MAC-PRO-DEMON macrumors 6502a

    MAC-PRO-DEMON

    Joined:
    Jul 10, 2008
    Location:
    Up north in Yorkshire :)
    #9
    Nice... but it wont work for me unfortunatly... Thanks all the same...

    J
     
  10. silvine thread starter macrumors member

    Joined:
    May 22, 2008
    #10
    That's why I put it up, it won't work for me either. I'm hoping someone here can fix it. ;)
     
  11. ncmason macrumors regular

    ncmason

    Joined:
    Feb 27, 2007
    #11
    I got it figured out!

    Read this:
    http://www.macosxhints.com/article.php?story=20080213200213250

    Basically you get the string from the Variable by right-clicking on the Automator app you made to Show Package Contents.

    Then open the document.wflow file with TextEdit.

    Search for the Variable name. It's in this format:

    Code:
           <dict>
                <key>UUID</key>
                <string>[B]F4557A41-C2C2-4118-BEBE-842800376CC2[/B]</string>
                <key>identifier</key>
                <string>com.apple.Automator.Variable.Path</string>
                <key>name</key>
                <string>MusicFolder</string>
                <key>value</key>
                <string>/Users/Mason/Desktop/test</string>
            </dict>
    

    Instead of using Move Finder Items to Trash, use Run AppleScript:
    Code:
    do shell script "mv $([B]F4557A41-C2C2-4118-BEBE-842800376CC2[/B]) ~/.Trash"
     
  12. silvine thread starter macrumors member

    Joined:
    May 22, 2008
    #12
    Any chance you can post up the completed app or workflow?
     
  13. ncmason macrumors regular

    ncmason

    Joined:
    Feb 27, 2007
    #13
    You need to remember to change the String name inside the Run AppleScript part.

    Let me know if you are still having problems getting this to work ;)
     

    Attached Files:

Share This Page