Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

This is a little hard to explain, so I'll try with an example. I have a lot of always active applications that have the feature which enables them to be minimized to system tray. Double click / or single click to restore them, and down there again they go.

So I spend a lot of time double/single clicking.

Is it possible, and how would one go about it, to define an for example AHK shortcut for minimizing/restoring back again those applications (where every app. would have its own shortcut, of course)?

Of course, all other approaches are equally welcomed.

share|improve this question

If running the application's executable again unminimizes it, making an AHK hotkey is trivial - otherwise it'd take a little more work.

share|improve this answer
How would one go for example with uTorrent (or any other more common application) ... could you give an example ? I must admit I'm having a little problem understanding what yo mean by "If running the application's executable again unminimizes it" since the app is running in the background all the time ? Is it not ? – Rook Jan 16 '10 at 22:43
Yes, but uTorrent is a good example - if you run utorrent.exe while it's running, the main window pops up. That means you can easily bind an AHK hotkey to check if utorrent is focussed, and then either close the window or run the executable - effectively a toggle. Most applications that hide away in the system tray do this, to my knowledge. – Phoshi Jan 16 '10 at 22:59

If the app will move itself to system tray when minimised, you can use this;

#SingleInstance Force
SetTitleMatchMode 2 ;match window if title contains keyword

^q:: ;ctrl+q to maximise
WinActivate Winamp ;replace with a word in your application title

!w:: ;alt+w to minimise
WinMinimize Winamp
share|improve this answer
I tried "WinClose" on thunderbird with "minimise to tray" plugin; it closed the application rather than minimising. (The behaviour if you press X). I think WinMinimize is your best bet. If you don't need the icon to show in system tray, you can use "WinHide" and "WinShow". – RJFalconer Jan 17 '10 at 0:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .