1

I'm trying to set checkbox in Mission Control pane in System Preferences. So far I'm able to open MC but I have no idea how to click on checkbox. I tried everything I found on Internet but with no luck... How can I do it?

tell application "System Preferences" activate set current pane to pane "com.apple.preference.expose" end tell

1 Answer 1

1

This will click the first checkbox of the pane only if it is currently not checked:

tell application "System Preferences"
    set current pane to pane "com.apple.preference.expose"
    activate
end tell
tell application "System Events"
    tell process "System Preferences"
        set firstCheckbox to checkbox 1 of group 2 of window 1
        set checked to value of firstCheckbox as boolean
        if (not checked) then
            click firstCheckbox
        end if
    end tell
end tell
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.