I am trying to write an applescript to change hot corners settings in System Preferences.
Here is what I have got until now.
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.desktopscreeneffect"
end tell
tell application "System Events"
tell process "System Preferences"
click button "Hot Corners..."
end tell
end tell
But I get this error:error "System Events got an error: Can’t get button \"Hot Corners...\" of process \"System Preferences\"." number -1728 from button "Hot Corners..." of process "System Preferences"
. I would appreciate anyone explaining what is going wrong in here, plus is there any way to get properties(such as available buttons) of a pane?