我正在尝试编写一个简单的applescript,以通过家长控制允许我的来宾用户帐户使用应用程序(“地址簿”)。
所以我从头开始,我打开了系统偏好设置/家长控制,我解锁了授权。
以下applescript 应检查通讯簿。
tell application "System Events"
tell process "System Preferences"
tell window "Parental Controls"
click checkbox "Address Book" of row 3 of outline "Allowed Apps:" of scroll area 1 of tab group 1
end tell
end tell
end tell
我遇到的问题是这个脚本没有选中复选框,我确信选项卡组 1 的滚动区域 1 的大纲“允许的应用程序:”的路径第 3 行是正确的。任何人都知道为什么这个简单的脚本不起作用。