Results 1 to 3 of 3
  1. #1

    Member Since
    Nov 25, 2011
    Help Please! I need Applescript help!
    Hi everyone, I'm a new poster to the forum but have always searched through your vast knowledge for other issues

    I have an unusual setup at home, we have a XServe running 10.5.8 that has hard drive specifically for storing movies and TV shows. With the addition of an AppleTV to our living room, we decided that we would like all of the movies and TV shows added to iTunes. After a ton of converting and adding meta data, I finally have all the files we currently have in iTunes. The problem is, tomorrow when I rip yet another princess DVD for our daughter and add it to the movies folder, how do I get it to be added to iTunes automatically so she can access it through the AppleTV?

    I found on DougScripts page the simple applescript for adding to iTunes, but it isn't working for me. I think because of the way we have our folder structure:

    >>Title 1
    >>Title 2
    >>Title 1
    >>Title 2

    The script is:
    on adding folder items to my_folder after receiving the_files
    repeat with i from 1 to number of items in the_files
    tell application "iTunes"
    set this_file to (item i of the_files)

    add this_file

    end try
    end tell
    end repeat
    end adding folder items to

    Please Help! I have worked on it and searched for hours and am at my wits end.

  2. #2

    Mark FX's Avatar
    Member Since
    Aug 13, 2011
    West Sussex, UK
    That can't be the whole Applescript that you have posted.
    It looks like just a single Applescript method that you have there, and it has no way of
    knowing what folder the my_folder variable needs, or the files the the_files variable also needs.

    Post the whole script if you need help with it, or a link to the downloaded Applescript so
    someone can go through the linked script.

    Regards Mark

  3. #3

    MacGrunt's Avatar
    Member Since
    Aug 02, 2011
    This IS a complete applescript. The structure — "on adding folder items..." — indicates it is set up to be run as a folder action. The script needs to be attached to a folder — when items are dropped in the folder, the script will add them to iTunes.

    But, jf4m, that's the extent of the script — it just adds the items to iTunes. This script in its current form has no way of knowing which part of the hierarchy you are trying to add an item to. So, basically, it does exactly the same as drag-dropping the files straight onto the iTunes icon in your dock (except it won't automatically start playing them).

    I expect the script was originally written to work with a download folder (ie. items are added to iTunes at download — without the need to drag-drop)

    Hope that helps a little.


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Applescript
    By EdMarx in forum OS X - Apps and Games
    Replies: 0
    Last Post: 02-10-2012, 05:06 AM
  2. Applescript
    By SgtDave in forum OS X - Development and Darwin
    Replies: 6
    Last Post: 01-19-2011, 04:50 PM
  3. Applescript help please?
    By thtguyjosh in forum OS X - Apps and Games
    Replies: 8
    Last Post: 08-22-2010, 08:22 PM
  4. Applescript
    By nixonbw in forum OS X - Operating System
    Replies: 0
    Last Post: 07-17-2008, 08:00 PM
  5. AppleScript
    By TehHero in forum OS X - Apps and Games
    Replies: 0
    Last Post: 01-26-2008, 10:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts