X

Playing ITunes from Nashorn

Jim Laskey
Senior Development Manager

If you are on Mac OS X, it's possible to use Apple Script from Nashorn.  For example if you want to play a song in iTunes, the following script will do it;

#!/usr/bin/jjs -scripting
#
var song = "Bring It On Home";
$EXEC("/usr/bin/osascript", <<<EOD);
tell application "iTunes"

activate

play track "${song}" in playlist 1
end tell
EOD

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services