Skip to content

Instantly share code, notes, and snippets.

@stephenroller
Created February 2, 2009 18:45
Show Gist options
  • Save stephenroller/57037 to your computer and use it in GitHub Desktop.
Save stephenroller/57037 to your computer and use it in GitHub Desktop.
Gives a back button/expose button for the mighty mouse
tell application "System Events" to set appList to name of application processes whose frontmost is true
set frontApp to item 1 of appList
if frontApp is "Safari" then
tell application "System Events" to keystroke "[" using command down
else
-- expose all windows
tell application "System Events" to key code 101
end if
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment