osascript -e 'tell app "iTunes" to set sound volume to sound volume +20'
osascript -e 'tell app "iTunes" to next track'
osascript -e 'tell app "iTunes" to previous track'
osascript -e 'tell app "iTunes" to playpause'
osascript -e 'tell app "iTunes" to play'
osascript -e 'tell app "iTunes" to pause'
osascript -e 'tell application "iTunes" to return name of current track'
osascript -e 'tell application "iTunes" to set song repeat of current playlist to one'
osascript -e 'tell application "iTunes" to set shuffle of current playlist to not shuffle of current playlist'
tell application "iTunes"
tell first library playlist to set shuffle to not shuffle
end tell
Notes:
- The setting in volume command is incremental, i.e. in the example it will increase volume by 20. So to reduce volume just replace + with - sign.
- The rating range from 0 to 100 (1 to 5 stars), so you can actually set half stars which iTunes will display correctly but there is no way of setting half stars vis the UI.
- The mute command will toggle the mute button
- The repeat value can be off, one or all.