PDA

View Full Version : Using Cron to run applescripts


Lecter
10-30-2007, 03:32 AM
This will toggle play and pause in iTunes:

/usr/bin/osascript -e 'tell application "iTunes" to playpause'

To stop:

/usr/bin/osascript -e 'tell application "iTunes" to stop'

To play track 1 of Year Zero:

/usr/bin/osascript -e 'tell application "iTunes" to play track 1 of playlist "Year Zero"'

To play playlist tool:

/usr/bin/osascript -e 'tell application "iTunes" to play playlist "Tool"'

CronniX (http://www.abstracture.de/projects-en/cronnix) is a gui to set up crontabs