How to fast set hot corners in Mavericks?

I used a downloaded applescript to fast enable/disable hot corners but they don't work after I upgrade to Mavericks. Someone knows what's happening?

Here's the disable script, hope it'll help you know what I'm talking about.

tell application "System Events"
    activate
    if UI elements enabled then
        tell expose preferences
            set properties of the top left screen corner to {activity:none, modifiers:{}}
            set properties of the top right screen corner to {activity:none, modifiers:{}}
            set properties of the bottom left screen corner to {activity:none, modifiers:{}}
            set properties of the bottom right screen corner to {activity:none, modifiers:{}}
        end tell
    else
        tell application "System Preferences"
            activate
            set current pane to pane "com.apple.preference.universalaccess"
            display dialog "UI element scripting is not enabled. Check \"Enable access for assistive devices\""
        end tell
    end if
end tell

tell application "System Preferences" to quit

Solution 1:

A solution was posted at https://discussions.apple.com/message/23989931:

property theSavedValues : {"Mission Control", "Desktop", "Dashboard", "Launchpad"} -- for example

tell application "System Preferences"
    activate
    set current pane to pane id "com.apple.preference.expose"
    tell application "System Events"
        tell window "Mission Control" of process "System Preferences"
            click button "Hot Corners…"
            tell sheet 1
                tell group 1
                    set theCurrentValues to value of pop up buttons
                    if theCurrentValues is {"-", "-", "-", "-"} then
                        repeat with i from 1 to 4
                            set thisValue to item i of theSavedValues
                            tell pop up button i
                                click
                                click menu item thisValue of menu 1
                            end tell
                        end repeat
                    else
                        copy theCurrentValues to theSavedValues
                        repeat with i from 1 to 4
                            tell pop up button i
                                click
                                click last menu item of menu 1
                            end tell
                        end repeat
                    end if
                end tell
                click button "OK"
            end tell
        end tell
    end tell
    quit
end tell

Solution 2:

Before Mavericks there was indeed a property in System Events called "Expose preference".

Since 10.7 Lion, Expose was replaced by Mission Control, so this must be a remaining of this past time (The pref pane is called Expose.prefPane).

But in Mavericks this property was removed and not replaced.

tell application "System Events" to get properties returns

  • security preferences
  • network preferences
  • screen saver preferences
  • appearance preferences
  • CD and DVD preferences
  • dock preferences

And none of them has access to the hot corner properties.

So, no it's currently not possible to do the same thing. Or to be more precise, to do it without UI scripting. (BTW your script does not use UI scripting features).