Skip to content

Instantly share code, notes, and snippets.

@juev
Forked from fogus/itunes.clj
Created January 6, 2013 17:42
Show Gist options
  • Save juev/4468897 to your computer and use it in GitHub Desktop.
Save juev/4468897 to your computer and use it in GitHub Desktop.
(defn itunes [command]
(let [mgr (javax.script.ScriptEngineManager.)
engine (.getEngineByName mgr "AppleScript")]
(.eval engine (str "tell application \"iTunes\" to " command))))
(itunes 'pause)
(itunes 'play)
(itunes 'stop)
;; ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment