Hi Ricabude,
Please use this AppleScript in KM to select the buttons, simply replace the word "Ask to join new networks" with the exact name of the checkbox you would like to select.
Everytime the script below executes it will automatically tick and then untick if you execute it again.
activate application "System Preferences"
tell application "System Events"
tell process "System Preferences"
click checkbox 1 of row 1 of table 1 of scroll area "Select a protocol to configure:" of group 1 of tab group 1 of sheet 1 of window "Network"
end tell
end tell
However, if you need to get the value before you execute the above script for an IF statement then you can use
activate application "System Preferences"
tell application "System Events"
tell process "System Preferences"
get value of checkbox 1 of row 1 of table 1 of scroll area "Select a protocol to configure:" of group 1 of tab group 1 of sheet 1 of window "Network"
end tell
end tell
If result value is 0 then it is unticked
If result value is 1 then it is ticked