AppleScript Volume Switch [duplicate]
Possible Duplicate:
Increase volume on mac using AppleScript?
I am very new to AppleScript so I'm not even sure if this is possible. I want to set the volume to a 10 using a keystroke or just running the script 开发者_运维百科then pressing the same keystroke or running the script again to set it back to the variable prior to setting it to 10.
Cheers.
property prevVol : 0
get output volume of (get volume settings)
if the result is not 10
set prevVol to the result
set volume output volume 10
else
set volume output volume prevVol
end if
精彩评论