Created
September 29, 2016 18:24
-
-
Save XuankangLin/e1cdadf96e9857c5f3a68fb8e6973312 to your computer and use it in GitHub Desktop.
Volume Up or Volume Down applescript for alfred
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on alfred_script(q) | |
-- your script here | |
set current to output volume of (get volume settings) | |
set old to current | |
set current to current + 10 | |
if (current > 100) then | |
set current to 100 | |
end if | |
set volume output volume current | |
set message to "The volume is now " & current & "/100" | |
return message | |
end alfred_script | |
-- Above is for Volume Up | |
-- Below is for Volume Down | |
on alfred_script(q) | |
-- your script here | |
set current to output volume of (get volume settings) | |
set old to current | |
set current to current - 10 | |
if (current < 0) then | |
set current to 0 | |
end if | |
set volume output volume current | |
set message to "The volume is now " & current & "/100" | |
return message | |
end alfred_script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment