开发者

AppleScript Volume Switch [duplicate]

开发者 https://www.devze.com 2023-04-04 00:22 出处:网络
This question already has an answer here: Closed 11 years ago. Possible Duplicate: Increase volume on mac using AppleScript?
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

精彩评论

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