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

Here's the code:
# 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

# 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.

Hope this is useful to some!

-Bruce

ps: Sorry for the ugly code formatting. I'm not actually a programmer and this is my first time here.

Here's the code:
# 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.

Hope this is useful to some!

-Bruce

ps: Sorry for the ugly code formatting. I'm not actually a programmer and this is my first time here.

# 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.

Source Link
Bruce
  • 557
  • 4
  • 18

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.

Here's the code:
# 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.

Hope this is useful to some!

-Bruce

ps: Sorry for the ugly code formatting. I'm not actually a programmer and this is my first time here.