Hi all,
Can anyone suggest me:
How to set Primary Button, Secondary Button and other properties of Mouse Preference via AppleScript?
I have now tried this, script:
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
tell window "Mouse"
set value of pop up button 1 to "Primary Button"
end tell
end tell
end tell
but it is giving this error message:
System Events got an error: Can't get pop up button 1 of window "Mouse" of process "System Preferences". Invalid index.
Can anyone suggest me where I may be wrong or some better trick to implement it?
Thanks,
Miraaj