【发布时间】:2019-07-12 05:19:30
【问题描述】:
我正在使用下面的脚本来启用开发者菜单。
tell application "Safari"
tell application "System Events"
tell process "Safari"
click menu item "Preferences…" of menu 1 of menu bar item "Safari" of menu bar 1
click button "Advanced" of toolbar 1 of window 1
click checkbox "Show Develop menu in menu bar" of group 1 of group 1 of window 1
-- delay 2
keystroke "w" using {command down} -- > not working
end tell
end tell
end tell
如何关闭首选项窗口?使用keystroke "w" using {command down},我得到了不能The document cannot be closed while the script is running. 错误。
只有在未启用的情况下,如何启用复选框?目前,如果我运行脚本两次,它会切换。
【问题讨论】:
标签: macos applescript