Hide all applications and show a specific app with shortcut key
OSX 10.6. I got rid of dashboard shortcut, never used it. I use stickies a lot on my desktop. Can be a pain getting to it at times. Any idea how to map the F4 key to: hide all applications and only show stickies?
Solution 1:
Press Cmd-Opt-H
to hide all other applications.
You can use Automator to create a Service that activates Stickies and hides all other applications. Start Automator, create a Service that receives no input in any application and add the Run AppleScript action with the following code:
tell application "Stickies" to activate
tell application "System Events" to keystroke "h" using {command down, option down}
Save as "Show Only Stickies" and it will show up in any application's Application Menu » Services.
You might need to enable support for assistive devices in System Preferences » Universal Access for this to work.
Assign a keyboard shortcut to your Service in System Preferences » Keyboard » Keyboard Shortcuts » Services.
If this doesn't work (e.g. F4 doesn't work in that list), go to Application Shortcuts, add a new one for the menu item "Show Only Stickies", press F4 for the shortcut, and confirm. You need to switch applications for it to work.