-10.3 C
New York
Monday, December 23, 2024

AppleScript Not Deciding on Button in System Settings


I am making an attempt to write down an AppleScript that selects “Shuffle All” and toggles “Present on all Areas” within the Wallpaper choice pane in System Settings (see screenshot). Nevertheless, the command to click on on the button “Shuffle All” would not appear to work.

enter image description here

Here is the AppleScript

-- Open System Preferences
inform software "System Settings"
    activate
    delay 1
    set present pane to pane id "com.apple.Wallpaper-Settings.extension"
finish inform

-- Anticipate the Wallpaper pane to load
delay 1


inform software "System Occasions"
    inform course of "System Settings"
        click on button 1 of UI ingredient 1 of scroll space 6 of UI ingredient 1 of scroll space 2 of group 1 of group 2 of splitter group 1 of group 1 of window "Wallpaper"
        
        set theCheckbox to checkbox "Present on all Areas" of group 2 of scroll space 1 of group 1 of group 2 of splitter group 1 of group 1 of window "Wallpaper"
        inform theCheckbox
            if not true then click on theCheckbox
        finish inform
    finish inform
finish inform

I imagine the UI ingredient is appropriate. I ran total contents of window 1 and it appears clear that “Shuffle All” is certainly button 1 of UI ingredient 1 of scroll space 6 of UI ingredient 1 of scroll space 2 of group 1 of group 2 of splitter group 1 of group 1 of window "Wallpaper".

Why the command to click on the button would not do something is a thriller to me, although. Any assistance is tremendously appreciated.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles