开发者

AppleScript Volume Switch [duplicate]

This question already has an answer here: Closed 11 years ago.

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜