I'm bored of pressing 2 key shortcuts
need to write a script that tells mission control the following:
- if not at desktop1, switch to desktop 1
- perform "show desktop" (windows will be hidden\displayed, depending on how they are now)
PS: where can i find info on taming Mission Control and Finder?
currently i use it like this:
tell application "System Events"
key code 18 using {option down, command down} --current shortcut for "Switch to Desktop 1"
key code 103 --current shortcut to "Show Desktop"
end tell
but there is no check for "i'm on desktop 1 already", and no toggle (show\hide windows)
tell application "System Events" to set BGpict1 to last text item of (picture of current desktop as text)
is used to compare to a list. NOW, you could do this "demand" TWICE (>BGpict2), before and after key codes. If they are identical you are still in desktop 1. Do a simple "display dialog".