我正在开发一个可单击应用程序菜单栏中的菜单项的 applescript。我想在不显示单击目标菜单项的整个过程的情况下运行此脚本。例如,下面是一些代码,用于单击disable for an hour
F.lux 应用程序菜单栏中的菜单项
ignoring application responses
tell application "System Events" to tell process "Flux"
click menu bar item 1 of menu bar 2
end tell
end ignoring
do shell script "killall System\\ Events"
delay 0.1
tell application "System Events" to tell process "Flux"
tell menu bar item 1 of menu bar 2
click menu item "Disable for an hour" of menu 1
end tell
end tell
运行此脚本时如何防止显示 gui 操作?