Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have software that does the command, I want to somehow bind it to a keyboard key:

Take it as a general question given a tray icon right clicking it and going through submenus, i'd like to speed up the process and make a shortcut to this option.

and it is possible in theory. if something could for example record what setting the option changes.. and assign a keyboard shortcut to it.

alt text

share|improve this question
What app is providing that menu? – Doug Harris Dec 17 '10 at 18:27
What's wrong with Alt+Tab or (if the OS is new enough) "Windows key" + tab? Please give us more information like Doug Harris is talking about. – David Dec 17 '10 at 18:40
@Doug Harris Rainlendar. Can autohotkeys not do it? There is no minimize button, it uses one of those special skins.. and doesn't appear in alt-tab menu. there are probably quite a few apps like it. If there was a way to go through the menu as mentioned with a shortcut, that'd be a solution regardless of app. but if you know of another solution, that's not quite as good but if it works and there's no better one then fine. I don't mind you stating it in comment before knowing what app it is, since it may be of use to know. – barlop Dec 18 '10 at 2:16
@David it's not even in Alt+Tab see comment above to Doug. – barlop Dec 18 '10 at 2:16
up vote 3 down vote accepted

AutoHotkey has PostMessage and SendMessage commands that can send internal "messages" to windows or controls. Often programs use these types of messages for their menu commands. To find out the proper message values you need, you use a program like Winspector to log messages of possible interest.

For more information, see SendMessage Tutorial.

(This tutorial is also buried in the AutoHotkey help file: go to the bottom of the PostMessage/SendMessage page, and in the Related links, click on Message Tutorial.)

The program pictured in Barlop's question is Rainlendar.

Using the methods from the tutorial above, I made the following example AutoHotkey script that sets F11 to "Hide all windows" and F12 to "Show all windows".

WM_COMMAND := 0x111
SHOW_ALL := 598
HIDE_ALL := 599

DetectHiddenWindows, On

#IfWinExist Rainlendar2 Control Window ahk_class wxWindowClassNR

  window_id := WinExist("Rainlendar2 Control Window ahk_class wxWindowClassNR")
  PostMessage, %WM_COMMAND%,%HIDE_ALL%,,,ahk_id %window_id%

  window_id := WinExist("Rainlendar2 Control Window ahk_class wxWindowClassNR")
  PostMessage, %WM_COMMAND%,%SHOW_ALL%,,,ahk_id %window_id%

share|improve this answer
(D'oh. Rainlendar has its own hotkey settings: OptionsHotkeys) – Bavi_H Dec 18 '10 at 5:39
thanks, i'm using the hotkeys within rainlendar now but it'd be good to have the autohotkeys script working with rainlendar too. i'm not that familiar with autohotkeys , but I just saved that code as .ahk and double clicked it, it looks like it's loaded in autohotkeys. I am trying F11 and F12 but nothing happens. – barlop Dec 18 '10 at 15:27
I just downloaded Rainlendar yesterday to play around with it. Perhaps the window name or command numbers are different in your version. You can try downloading the latest version of Rainlendar, or try using Winspector to find the values your version uses. – Bavi_H Dec 19 '10 at 0:05
just tried your script on another computer and it worked first time.. tried it again on the funny one and it worked straight away.. so I guess I just copy/pasted wrong.. Great stuff. – barlop Dec 19 '10 at 7:09
@Bavi_H By the way, out of interest, does that work by sending a message to the tray icon? or to the window that appears on the desktop? Is it to your knowledge possible to send it to the tray icon? – barlop Dec 19 '10 at 7:11

Windows 7 / Make shortcut:

Target Location: %windir%

Target: %windir%\explorer.exe shell:::{3080F90D-D7AD-11D9-BD98-0000947B0257}

Start in: %windir%

Then define shortcut key.

Windows XP (unverified):

If the show desktop option in quick launch both shows and hides the desktop (i don't remember) you can do the same thing with a shortcut for it.

Though i used to use other third party software to do this at XP (it also had configurable hotkeys)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.