Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

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 ? –  ldigas 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
return

!w:: ;alt+w to minimise
WinMinimize Winamp
return
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

Your Answer

 
discard

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.