【发布时间】:2017-08-23 23:22:16
【问题描述】:
我得到了我认为正确的代码,但它似乎并没有完全实现我想要的。我想要的只是让applescript在系统首选项的“共享”窗格中选择一个复选框。我不确定为什么它不会选中该框,我(据我所知)得到了正确的继承权,但什么也没做。
tell application "System Preferences"
activate
set the current pane to pane id "com.apple.preferences.sharing"
end tell
delay 2
tell application "System Events" to tell process "System Preferences"
click checkbox 1 of row 1 of table 1 of scroll area of group 1 of window
"Sharing"
end tell
谢谢!
【问题讨论】:
标签: macos applescript