ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE. Software > Post New Requests Here

IDEA: AutoMaximize Windows

(1/2) > >>

I've been refused already in other forum...

Still, I think it a great Idea.

Possible?  :Thmbsup:

It doesn't seem difficult.  As each window has the focus a tray program could check if the handle is in the list of already processed windows.  If not, get the window attribute.  Check if it has maximize button in frame.  If so, and the current state is not maximized, then max it.

Unfortunately I'm on public library computers for the time beaing.  I can't load any programs let alone programming tools like AHK_L.

A simple Object or associative array with the window handle as the key should be fine for keeping track of windows that have already been maxed.

You could also check a program called WinSize2 to see if it already has the feature.


"would maximize automatically every maximizable window, when new windows of apps/Explorer etc opening."
--- End quote ---
   As I re-read the other linked thread I think this is more suitable for your needs.


--- Code: Autohotkey ---;;DLLCall / Shell / MsgBox = SKAN ;-------------------------------------------------------------------;--Program monitors newly opened windows & maximizes accordingly--;------------------------------------------------------------------- #SingleInstance, force#Persistent#NoEnvSetWorkingDir %A_ScriptDir% DetectHiddenWindows, ononexit, exitsub Gui +LastFoundhWnd := WinExist() DllCall( "RegisterShellHookWindow", UInt,hWnd )MsgNum := DllCall( "RegisterWindowMessage", Str,"SHELLHOOK" )OnMessage( MsgNum, "ShellMessage" )Return ShellMessage( wParam,lParam ){  Local k  If ( wParam = 1 ) ;  HSHELL_WINDOWCREATED := 1  {       NewID := lParam       SetTimer, MsgBox, -1  }} MsgBox:         WinGetTitle, Title, ahk_id %NewID%         WinGetClass, Class, ahk_id %NewID%         WinWait, ahk_id %NewID%                TrayTip, New Window Opened, Title:`t%Title%`nClass:`t%Class%        minmax_func()Return ralt & Esc::    ;right Alt key & Escexitsub:{    critical        Exitapp} ;=================;==Function(s)====;=================minmax_func(){        global NewID, minmax        WinGet, minmax, minmax, ahk_id %NewID%    if (minmax=0)   {      WinMaximize, ahk_id %NewID%          ;use PostMessage for stubborn windows          ;PostMessage, 0x112, 0xF030,,, NewID  ; 0x112 = WM_SYSCOMMAND, 0xF030 = SC_MAXIMIZE   }   else        if (minmax=-1)        {                WinRestore, ahk_id %NewID%        }}

Added functionality so that if your program window opens minimized it handles that as well.


Hi BigVent,
Sorry for the huge delay... (I didn't get a notification about your reply to my email)
I checked today the script, and it's realy awesome. Very helpful, thank you very much.

There are only few improvments should be done:

1. There are few cases of unwated maximizing, like:

* When restoring a window from "Minimize to tray", shouldn't be maximized.
* In opening Properties of file/folder (Alt+Enter).
* Dialog-box of WinRar extracting.2. Popup Baloons of icon tray should be removed.

Thank you, Stamimail


[0] Message Index

[#] Next page

Go to full version