- 积分
- 170
- 金钱
- 151
- 威望
- 0
- 贡献
- 0
- HASS币
- 0
注册会员
- 积分
- 170
- 金钱
- 151
- HASS币
- 0
|
发表于 2023-3-2 21:22:00
|
显示全部楼层
use framework "Foundation"
property pane_ids : {|AppleID|:2, |Family|:3, |Wi-Fi|:5, |Bluetooth|:6, |Network|:7, |Notifications|:9, |Sound|:10, |Focus|:11, |Screen Time|:12, |General|:14, |Appearance|:15, |Accessibility|:16, |Control Center|:17, |Siri & Spotlight|:18, |Privacy & Security|:19, |Desktop & Dock|:21, |Displays|:22, |Wallpaper|:23, |Screen Saver|:24, |Battery|:25, |Lock Screen|:27, |Touch ID & Password|:28, |Users & Groups|:29, |Passwords|:31, |Internet Accounts|:32, |Game Center|:33, |Wallet & ApplePay|:34, |Keyboard|:36, |Trackpad|:37, |Printers & Scanners|:38, |Java|:40}
on open_settings_to(settings_pane)
set pane to current application's NSDictionary's dictionaryWithDictionary:pane_ids
set pane_index to (pane's valueForKey:settings_pane) as anything
tell application "System Settings"
activate
delay 1
end tell
tell application "System Events"
tell application process "System Settings"
tell outline 1 of scroll area 1 of group 1 of splitter group 1 of group 1 of window 1
select row pane_index
end tell
end tell
end tell
end open_settings_to |
|