【发布时间】:2020-05-04 14:17:02
【问题描述】:
我有一个工作脚本,我想看看是否有办法隐藏或只是让脚本在后台运行。当前的工作脚本会物理激活窗格,因此用户可以看到它发生在他们面前。
tell application "System Preferences"
activate
set the current pane to pane "Bluetooth"
delay 1
end tell
tell application "System Events"
tell process "System Preferences"
set toggleBluetooth to the checkbox "Show Bluetooth in menu bar" of the window "Bluetooth"
click toggleBluetooth
end tell
end tell
我还找到了一种可以立即打开某些东西的方法,我想知道是否有办法让它与蓝牙和音量配合使用。
tell application "Finder"
tell Finder preferences
set desktop shows hard disks to true
end tell
end tell
【问题讨论】:
-
这有帮助吗? Menu bar customization
标签: bash macos applescript macos-catalina menubar