It means you get all the functionality if windows+up with the added bonus of centreĪutohotkey script to toggle minimize/restore? Basically I combined this case and this one. If the window is restored it will maximise it. If the window is maximised it will restore it to the middle of the screen. I took solution and made it so the windows+up key would perform this function and maximise/restore the window. In addition to being very powerful and covering much more use cases, AutoHotkey is also free and open source. On a side note, WinSplit Revolution has been discontinued and replaced by a paid app called MaxTo. Now working with multiple monitors, and uses the work area for top and bottom values. I made a slight adjustment so the bottom of the window doesn't go beneath the taskbar, and changed the windowWidth from 0.7 to 0.5. MonitorHandle := DllCall("MonitorFromWindow", "uint", winHandle, "uint", 0x2)ĭllCall("GetMonitorInfo", "uint", monitorHandle, "uint", &monitorInfo)Ī_Right := NumGet(monitorInfo, 28, "Int")Ī_Bottom := NumGet(monitorInfo, 32, "Int") #!Up::CenterActiveWindow() if win+alt+↑ is pressed Here's the code of the script: #Requires AutoHotkey v1.1.33.02 Change the factor to fit your desired width.Īn example script that does exactly what you asked was already provided in an answer to another question. WABottom := NumGet(monitorInfo, 32, "Int") WARight := NumGet(monitorInfo, 28, "Int") Get WorkArea bounding coordinates of the current monitor. ![]() ![]() MonitorHandle := DllCall("MonitorFromWindow", "UInt", winHandle, "UInt", 0x2)ĭllCall("GetMonitorInfo", "Ptr", monitorHandle, "Ptr", monitorInfo.Ptr, "Int") Get the current monitor from the active window handle. NumPut("UInt", monitorInfo.Size, monitorInfo, 0) Create a memory buffer to store DllCall return. Prevent errors if there is no active window. Get the window handle from de active window. : The Microsoft PowerToys “Fancy Zones” feature can more or less fit this use case now:īut I'm not completely happy with it yet, and since AutoHotkey has recently reached v2.0, here's a ported version of the script: #Requires AutoHotkey v2.0
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |