/ Published in: Python
Control your iTunes in Nuke
Expand |
Embed | Plain Text
#pxNukeTunes v0.01 Donald Strubler, 8/24/2010 #OS: works on Mac OS architecture, needs OSAScript, a basic terminal language #Usage: import this module into your menu.py # a sample from mine is # import pxNukeTunes # toolbar = nuke.addMenu('pxTools') # toolbar.addCommand('iTunes/Play', 'pxNukeTunes.play()', 'Shift+Alt+Up') # This specific pxNukeTunes.py is intended for @iOskar import os import sys import nuke iTunes = '\"iTunes\"' next = '\"next track\"' prev = '\"previous track\"' pause = '\"pause\"' play = '\"play\"' tell = str( 'osascript -e \'tell application ') endTell = '\"end tell\"' nextTrack = str(tell + iTunes + "' ") + "-e " + next + " -e " + endTell prevTrack = str(tell + iTunes + "' ") + "-e " + prev + " -e " + endTell pauseTrack = str(tell + iTunes + "' ") + "-e " + pause + " -e " + endTell playTrack = str(tell + iTunes + "' ") + "-e " + play + " -e " + endTell def next(): os.system(nextTrack) def prev(): os.system(prevTrack) def pause(): os.system(pauseTrack) def play(): os.system(playTrack)
Comments
Subscribe to comments
You need to login to post a comment.

I thought I was the only one using Nuke on mac. Very cool idea this script