Skip to main content
2 of 2
deleted 369 characters in body
nohillside
  • 104.5k
  • 42
  • 222
  • 275

Well, this is an old one, but it seems there aren't really good answers for this question anywhere.

I've gotten an AppleScript to work, though it requires a third-party, unmaintained, and un-registrable app—Extra Suites. It can be downloaded on the developer's old website.

# Gets the current state of the upper left hot corner, then sets it to sleep display.
tell application "System Events"
  tell expose preferences
    set givenActivty to get the activity of the top left screen
    set the properties of the top left screen corner to {activity:sleep display}
  end tell
end tell

# Uses Mouse to Activate upper left hot corner. [Moving directly to {0, 0} does not work
tell application "Extra Suites" 
  ES move mouse {1, 1}
  ES move mouse {0, 0}
end tell

# Restores state of upper left hot corner.
tell application "System Events"
  tell expose preferences
    delay 1
    set the activity of the top left screen corner to givenActivty
  end tell
end tell

# Gets rid of Extra Suites nag window.
tell application "Extra Suites"
  quit
end tell

I've also incorporated it into an Alfred Workflow.

Bruce
  • 557
  • 4
  • 18