Applescript actions -Upon CD insertion

Discussion in 'Mac Programming' started by Macguy97, Dec 23, 2011.

  1. macrumors newbie

    Sep 11, 2010
    So far I have the script:

    if player_state of application "iTunes" is paused then
    tell application "Finder"
    eject disk "Audio CD"

    And a script I found online

    tell application "iTunes"
    set myCD to first source whose kind is audio CD
    tell playlist 1 of myCD
    repeat 4 times
    set shuffle to false
    set shuffle to true
    end repeat

    I was going to put them together so I would have a script in which I insert a CD and have it automatically play and then eject once finished.

    I think I'm on the wrong track...

    Anyone have any ideas? :rolleyes:

Share This Page