42639
AppleScriptからNightShiftのON/OFFを操作したいと思っています。

  * 明日までONにするというところのCheckboxの操作の仕方がわからない
  * UIの取得の仕方が分からない

ご教授いただければ幸いです、よろしくお願いいたします。

```

          tell application "System Preferences"
            activate
            reveal pane "com.apple.preference.displays"
          end tell
    
          delay 0.5
    
          tell application "System Events"
            tell process "System Preferences"
                try
                    click button "Night Shift" of window 1
    
                end try
            end tell
          end tell
    
          delay 0.5
    
          tell application "System Preferences"
            activate
            close window 1
          end tell
    
```
CC BY-SA 3.0
2018-03-25T03:24:12.050
42637
2018-03-25T04:10:09.833
27824
question
applescript
AppleScriptからNightShiftのON/OFFを操作したい
```

        tell application "System Preferences" to reveal ¬
            pane "com.apple.preference.displays"
    
    
        tell application "System Events"
            tell process "System Preferences" to tell ¬
                window 1 to set _T to ¬
                a reference to tab group 1
    
            repeat until _T exists
                delay 1
            end repeat
    
            tell _T
                click radio button 3 -- "Night Shift"
                click checkbox 1 -- "Turn On Until Later Today"
            end tell
        end tell
    
        quit application "System Preferences"
    
```
CC BY-SA 3.0
2018-03-25T04:10:09.833
42639
2018-03-25T04:10:09.833
27868
42637
answer