I want to click a radio-button in System Preferences if another radio-button is selected, like this:
tell application "System Preferences"
activate
end tell
tell application "System Events"
tell process "System Preferences"
click menu item "Mouse" of menu "View" of menu bar 1
if radio button "Right" is selected <-- pseudo-code
tell window "Mouse"
tell radio group 1
click radio button "Left"
end tell
end tell
end if
if radio button "Left" is selected <-- pseudo-code
tell window "Mouse"
tell radio group 1
click radio button "Right"
end tell
end tell
end if
end tell
end tell
anyone know how to do this?