Thanks, cjreceiver. Actually, I've finally been able to piece it together using the Accessibility Inspector, after all. It's taken some doing; and I still haven't figured out how to get the script to run while keeping System Settings hidden, which would be ideal. But here's the script that does indeed toggle the Trackpad Scrolling option (the setting of visibility to false near the top has the effect of moving the System Settings window below the Script Editor window only, still not invisible) — afraid the formatting looks sloppy here, as the text box is narrower than in Script Editor:
do shell script "open -b com.apple.systempreferences " & ¬
"/System/Library/PreferencePanes/UniversalAccessPref.prefPane"
tell
tell application "System Events"
tell its application process "System Settings"
delay 0.1
set visible to false
repeat until UI element 3 of group 3 of scroll area 1 of group group 1 of ¬
group 2 of splitter group 1 of group 1 of window "Accessibility" exists
delay 0.1
end repeat -- find Pointer Control option in Accessibility settings
click UI element 3 of group 3 of scroll area 1 of group 1 of group 2 ¬
of splitter group 1 of group 1 of window "Accessibility"
delay 0.1 -- click Pointer Control option
repeat until button 1 of scroll area 1 of group 1 of group 2 of splitter group 1 ¬
of group 1 of window "Pointer Control" exists
delay 0.1
end repeat -- find Trackpad Options button in Pointer Control
click button 1 of scroll area 1 of group 1 of group 2 of splitter group 1 ¬
of group 1 of window "Pointer Control" -- click Trackpad Options button
repeat until checkbox 1 of group 1 of scroll area 1 of group 1 of sheet 1 ¬
of window "Pointer Control" exists
delay 0.1
end repeat -- find Use Trackpad for Scrolling checkbox in Trackpad Options
click checkbox 1 of group 1 of scroll area 1 of group 1 of sheet 1 ¬
of window "Pointer Control" -- toggle Use Trackpad for Scrolling checkbox
repeat until button 2 of group 1 of sheet 1 of window "Pointer Control" exists
delay 0.1
end repeat -- find OK button in Trackpad Options
click button 2 of group 1 of sheet 1 of window "Pointer Control"
end tell
end
click UI element 3 of group 3 of scroll area 1 of group 1 of group 2 ¬
of splitter group 1 of group 1 of window "Accessibility"
delay 0.1 -- click Pointer Control option
repeat until button 1 of scroll area 1 of group 1 of group 2 of splitter group 1 ¬
of group 1 of window "Pointer Control" exists
delay 0.1
end repeat -- find Trackpad Options button in Pointer Control
click button 1 of scroll area 1 of group 1 of group 2 of splitter group 1 ¬
of group 1 of window "Pointer Control" -- click Trackpad Options button
repeat until checkbox 1 of group 1 of scroll area 1 of group 1 of sheet 1 ¬
of window "Pointer Control" exists
delay 0.1
end repeat -- find Use Trackpad for Scrolling checkbox in Trackpad Options
click checkbox 1 of group 1 of scroll area 1 of group 1 of sheet 1 ¬
of window "Pointer Control" -- toggle Use Trackpad for Scrolling checkbox
repeat until button 2 of group 1 of sheet 1 of window "Pointer Control" exists
delay 0.1
end repeat -- find OK button in Trackpad Options
click button 2 of group 1 of sheet 1 of window "Pointer Control"
end tell
end tell
delay 0.1
tell application "System Settings" to quit