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.

I am looking for a script to toggle between minimize and restore for Windows 7.

share|improve this question
2  
Why not just use the built-in Win + up or down arrow? –  Clare Macrae Mar 20 '12 at 20:07
add comment

2 Answers

up vote 2 down vote accepted

Toggling between Minimize and Restore doesn't make much sense as you'll need the Window in focus (or some other way) to send it the command.

Assuming you really mean toggle between Maximize and Restore...

I have these in my AutoHotkey.ahk. You'll be interested in the "F3" mapping which really is Ctrl-Shift-3 in my setup.

;-----------------------------------------------------------------------------------
; Shortcut keys to Minimize, Maximize/Restore the current Window {{{1
; Meant to operate as the 3 right buttons on the window
;
;                                         Alt-F2         = AutoHotkey
;                                            Alt-F3      = AutoHotkey
;                                                 Alt-F4 = Default Windows
; +----------------------------------------------------+
; |                                        [_] [ ] [X] |
; +----------------------------------------------------+
; |                                                    |
; |                                                    |
;-----------------------------------------------------------------------------------
!F2:: WinMinimize, A
!F3::
WinGet MX, MinMax, A
If MX
WinRestore A
Else WinMaximize A
return

^+2:: WinMinimize, A
^+3::
WinGet MX, MinMax, A
If MX
WinRestore A
Else WinMaximize A
return
^+4:: WinClose, A
share|improve this answer
    
While I didn't need all of this, I was able to use some of your code to enable me to do what I need it. Thanks a lot for your help. –  Carlos Mar 21 '12 at 11:07
add comment

Why not try Win + Up while a window is selected to maximise it.

When the window is maximised a quick Win + Down will restore it to it's unmaximised potential, and a further Win + Down will minimise it to the tray.

share|improve this answer
    
I just checked it and what you suggested is perfect. Please tell me how to write the script in Autohotkey. –  Carlos Mar 20 '12 at 23:03
1  
If you're on Windows 7 you don't need autohotkey to do this for you. It's already there in Windows. –  SecurityMatt Mar 21 '12 at 2:13
1  
The thing is that I like using Ctrl for my hot keys instead of the Windows key. –  Carlos Mar 21 '12 at 2:38
add comment

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.