DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: DONE: use hotkey to minimize the active window  (Read 18,698 times)

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
DONE: use hotkey to minimize the active window
« on: December 01, 2005, 02:21 PM »
Cross-post from http://www.donationcoder.com/forum/index.php?topic=1638 :

I did try Autohotkey some time ago, but the only thing I needed at the moment was minimizing currently active window on hotkey. I didn't find how to do it with Autohotkey in an hour, so now using Hotkeycontrol XP, which in fact has this function right out-of-the-box. Although, I open for suggestions on how to do this with Autohotkey.

I'm sure skrommel is able to come up with the code for this with the blink of an eye :)

I'd also like to add the code to my main script, there are times when this might come in handy!
Thank you.

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • Participated in NANY Challenge Twice
    • Coding Snacks
Re: IDEA: use hotkey to minimize the active window
« Reply #1 on: December 01, 2005, 03:45 PM »
:) Ctrl-M minimizes the active window.

Code
^m::WinMinimize,A

Skrommel

wasker

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 52
Re: IDEA: use hotkey to minimize the active window
« Reply #2 on: December 01, 2005, 05:13 PM »
Mmmm. Lovely. Thanks, guys! :)

The only question. I have a program that minimizes itself to tray. Neither Hotkeycontrol XP nor Autohotkey with this fantastic script can minimize it properly -- it always minimizes to taskbar. Although when I click Minimize button in window it does everything properly.

Any ideas on how to overcome this issue with Autohotkey? Any pointers too look for appreciated.

Thanks again!

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • Participated in NANY Challenge Twice
    • Coding Snacks
Re: IDEA: use hotkey to minimize the active window
« Reply #3 on: December 01, 2005, 07:16 PM »
:) You could use something like

Code
^m::
IfWinActive,titleoftroublesomeprogram
  MouseClick,xposofminimizebutton,yposofminimizebutton
Else
  WinMinimize,A

Skrommel

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
Re: IDEA: use hotkey to minimize the active window
« Reply #4 on: December 01, 2005, 08:32 PM »
I'm sure skrommel is able to come up with the code for this with the blink of an eye :)

:) Ctrl-M minimizes the active window.

Code
^m::WinMinimize,A
Ha! I knew it!! :D Thanks!
Thank you.

Original address: https://www.donationcoder.com/forum/index.php?topic=1670.0