Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在终端中执行命令为当前窗口或应用程序或任何设备设置音量....例如静音系统田鼠很简单:
osascript -e "set volume 1"
所以,我得到的应用程序女巫不仅仅在运行,我想放:
osascript -e "tell application \"Applicationame\" to set sound volume to 0"
1) 在哪里寻找应用程序名称?2)如何编写正确的命令?
这是正确的语法:
osascript -e 'tell app "Spotify" to set volume 2'
或者
osascript -e 'tell app "<app_name>" to set volume <volume>'