Skip to content

Instantly share code, notes, and snippets.

@tanhauhau
Created September 13, 2015 09:07
Show Gist options
  • Save tanhauhau/94a37bef53379f634e93 to your computer and use it in GitHub Desktop.
Save tanhauhau/94a37bef53379f634e93 to your computer and use it in GitHub Desktop.
Adjust iTunes volume through Applescript
tell application "iTunes"
set vol to sound volume
set vol to vol - 10
if vol is less than 0 then
set vol to 0
end if
set the sound volume to vol
end tell
tell application "iTunes"
set vol to sound volume
set vol to vol + 10
if vol is greater than 100 then
set vol to 100
end if
set the sound volume to vol
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment