I'd do this:
activate application "Logic Pro X"
tell application "System Events"
tell process "Logic Pro"
if value of pop up button 1 of window 1 is "Apply operations to selected events" then
else
click pop up button 1 of window 1
keystroke "a"
key code 36
end if
end tell
end tell
Here's a script for that:
activate application "Logic Pro X"
tell application "System Events"
tell process "Logic Pro"
set tracks_window to title of first window whose title contains "- Tracks"
click menu button "Functions" of group 1 of group 1 of group 4 of window tracks_window
end tell
end tell
It's certainly the best one I know of. KM doesn't have any radio button/check box actions, and using found images can get cumbersome. AS allows you to easily test the condition of the button/box and click if necessary, in one line.