| View previous topic :: View next topic |
| Author |
Message |
hometoast
Joined: 05 Oct 2009 Posts: 5
|
Posted: Wed Jan 13, 2010 4:34 pm Post subject: Find window state of active window Maximized or Normal |
|
|
I want to remap
and
| Code: | | #Down::"restore if maximized and minimize if restored" |
like it does in Windows 7. I am on Vista.
I can get the windowSize and position, but I can't seem to find if it's maximized or not. How would I find this?
thanks!
p.s. I did search the forums and wiki and google, but everything leads me to WinGetActiveStats |
|
| Back to top |
|
 |
jl34567
Joined: 03 Jan 2010 Posts: 262
|
Posted: Wed Jan 13, 2010 4:40 pm Post subject: |
|
|
WinRestore?
Unminimizes or unmaximizes the specified window if it is minimized or maximized.
I generally browse the list of commands....sometimes what you need practically slaps you in the face.......other times not so much. |
|
| Back to top |
|
 |
Peter
Joined: 30 Dec 2005 Posts: 448
|
Posted: Wed Jan 13, 2010 4:47 pm Post subject: |
|
|
| hometoast wrote: | | I can't seem to find if it's maximized or not... I did search the forums and wiki and google, but everything leads me to WinGetActiveStats | Search e.g. maximize in AHK Help file, 3rd result: Winget | AHK Help file wrote: | | MinMax: Retrieves the minimized/maximized state for a window. |
|
|
| Back to top |
|
 |
hometoast
Joined: 05 Oct 2009 Posts: 5
|
Posted: Tue Jan 19, 2010 3:52 pm Post subject: |
|
|
Thanks to both of you.
jl, it's the WinRestore I'll need to call depending on the value from Winget.
Also, please don't think I didn't search. I just searched for all the wrong things. Also the .chm doesn't work for me at work.. just loads empty. |
|
| Back to top |
|
 |
Jahangir
Joined: 08 Sep 2011 Posts: 4
|
Posted: Thu Sep 08, 2011 5:12 pm Post subject: |
|
|
| hometoast wrote: | Thanks to both of you.
jl, it's the WinRestore I'll need to call depending on the value from Winget.
Also, please don't think I didn't search. I just searched for all the wrong things. Also the .chm doesn't work for me at work.. just loads empty. |
It's an old thread, but for others who look, you need to use the CMD argument to specify what you need:
| Code: |
#z::
#d::
{
WinGetActiveTitle, title
WinGet, maximized, MinMax, %title%
if (maximized)
WinRestore, %title%
else
WinMaximize, %title%
return
}
|
|
|
| Back to top |
|
 |
|