使用AppleScript增加卷上Mac吗? [英] Increase volume on mac using AppleScript?

查看:168
本文介绍了使用AppleScript增加卷上Mac吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找到了命令,但我可以做到这一点在AppleScript的?

I found the command, but can I do it in AppleScript?

推荐答案

是的,您可以:使用设置音量输出音量的 N ,其中的 N 的是为 100 0 C $ C>。由于在体积接口16广场和100/16 = 6.25,有一个从广场没有直接映射到这个号码,但如果你把它作为一个百分比,你会没事的。还有设置输入音量与设置音量输入音量的 N 和警报体积设置音量警报的能力量的 N ; 设置音量输出静音的 BOOL 如果静音输出的 BOOL 的为真正,并取消静音它,如果它的。 (另外,设置音量...有输出静音设置音量...无输出静音)。你可以如果你想一次设置多个堆叠的东西这些。作为<一个href=\"http://stackoverflow.com/questions/4220582/increase-volume-on-mac-using-applescript/4220624#4220624\">Adam罗森菲尔德说,这里还有设置音量的研究,它(根据我的文档)取0和7之间的实数;但是,这是的德precated 的,并且有一个奇怪的范围内;我只是用设置音量输出音量来代替。如果您想查询当前音量,您可以运行获得音量设置,它返回表格 {输出量的记录:82,输入音量:46,提示音量:100,输出静音:假}

Yes, you can: use set volume output volume N, where N is an integer from 0 to 100. Since there are 16 squares in the volume interface, and 100/16 = 6.25, there's no direct map from squares to this number, but you'll be fine if you think about it as a percentage. There's also the ability to set the input volume with set volume input volume N, and the alert volume with set volume alert volume N; set volume output muted BOOL mutes the output if BOOL is true, and unmutes it if it's false. (Alternatively, set volume ... with output muted or set volume ... without output muted.) You can stack these if you want to set multiple things at once. As Adam Rosenfield says, there's also set volume R, which (according to my docs) takes a real number between 0 and 7; however, this is deprecated, and has a strange range; I'd just use set volume output volume instead. If you want to query the current volume, you can run get volume settings, which returns a record of the form {output volume:82, input volume:46, alert volume:100, output muted:false}.

这篇关于使用AppleScript增加卷上Mac吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆