I didn't know how to name it, this script is funny, but after using it for some days on a hotkey i find it useful, so i post it here to expose to ideas from other users.
Even for a beginner like me the code is easy to understand, but the real fun is to test this silly script. Enjoy.
--> Script updated to include 'maximize-restore-minimize' buttons
and buttons for 1024X768 & 800X600 window sizes
Code:
#SingleInstance force
gui, font, cFFDD00 s8, tahoma
gui, color, 324661
;let's build some GUI
gui,add,groupbox,x5 y5 w112 h118 center, Move Win To Edge
gui,add,button, x15 y22 w30 h30 gw1, •
gui,add,button, x47 y22 w30 h30 gw2, T
gui,add,button, x79 y22 w30 h30 gw3, •
gui,add,button, x15 y54 w30 h30 gw4, L
gui,add,button, x47 y54 w30 h30 gw5, •
gui,add,button, x79 y54 w30 h30 gw6, R
gui,add,button, x15 y86 w30 h30 gw7, •
gui,add,button, x47 y86 w30 h30 gw8, B
gui,add,button, x79 y86 w30 h30 gw9, •
gui,add,groupbox, x130 y5 w112 h118 center, Half Screen
gui,add,button, x172 y22 w30 h30 center gw10, •`n-
gui,add,button, x172 y86 w30 h30 center gw11, -`n•
gui,add,button, x140 y54 w30 h30 gw12, •|
gui,add,button, x204 y54 w30 h30 gw13, |•
gui,add,groupbox, x255 y5 w112 h118 center, 1/4 Tile To Edge
gui,add,button, x281 y38 w30 h30 gw14, TL
gui,add,button, x313 y38 w30 h30 gw15, TR
gui,add,button, x281 y70 w30 h30 gw16, BL
gui,add,button, x313 y70 w30 h30 gw17, BR
gui,add,button, x7 y138 w110 h15 gc1024, 1024X768
gui,add,button, x7 y155 w110 h15 gc800, 800X600
gui,add,button, x203 y148 w50 h20 gmin, min
gui,add,button, x260 y143 w50 h25 gres, restore
gui,add,button, x317 y138 w50 h30 gmax, max
Gui, Show, w372 h176, Move/Resize active win to selected positions
Return
guiescape:
GuiClose:
ExitApp
min:
winhide A
winminimize A
exitapp
max:
winhide A ;hide GUI to work on working window...
winmaximize A
exitapp
res:
winhide A
winrestore A
exitapp
c1024:
winhide A
WinGetPos,,, Width, Height, A
WinMove, A,, 0, 0, 1024, 768
exitapp
c800:
winhide A
WinGetPos,,, Width, Height, A
WinMove, A,, 0, 0, 800, 600
exitapp
w1:
winhide A
WinGetPos,,, Width, Height, A
WinMove, A,, 0, 0
exitapp
w2:
winhide A
WinGetPos,,, Width, Height, A
WinMove, A,, (A_ScreenWidth/2)-(Width/2), 0
exitapp
w3:
winhide A
WinGetPos,,, Width, Height, A
WinMove, A,, (A_ScreenWidth)-(Width), 0
exitapp
w4:
winhide A
WinGetPos,,, Width, Height, A
WinMove, A,, 0, (A_ScreenHeight/2)-(Height/2)
exitapp
w5:
winhide A
WinGetPos,,, Width, Height, A
WinMove, A,, (A_ScreenWidth/2)-(Width/2), (A_ScreenHeight/2)-(Height/2)
exitapp
w6:
winhide A
WinGetPos,,, Width, Height, A
WinMove, A,, (A_ScreenWidth)-(Width), (A_ScreenHeight/2)-(Height/2)
exitapp
w7:
winhide A
WinGetPos,,, Width, Height, A
WinMove, A,, 0, (A_ScreenHeight)-(Height)
exitapp
w8:
winhide A
WinGetPos,,, Width, Height, A
WinMove, A,, (A_ScreenWidth/2)-(Width/2), (A_ScreenHeight)-(Height)
exitapp
w9:
winhide A
WinGetPos,,, Width, Height, A
WinMove, A,, (A_ScreenWidth)-(Width), (A_ScreenHeight)-(Height)
exitapp
w10:
winhide A
WinGetPos,,, Width, Height, A
WinMove, A,, 0, 0, (A_ScreenWidth), (A_ScreenHeight/2)
exitapp
w11:
winhide A
winget, state, MinMax, A
WinGetPos,,, Width, Height, A
WinMove, A,, 0, (A_ScreenHeight/2), (A_ScreenWidth), (A_ScreenHeight/2)
exitapp
w12:
winhide A
winget, state, MinMax, A
WinGetPos,,, Width, Height, A
WinMove, A,, 0, 0, (A_ScreenWidth/2), (A_ScreenHeight)
exitapp
w13:
winhide A
winget, state, MinMax, A
WinGetPos,,, Width, Height, A
WinMove, A,, (A_ScreenWidth/2), 0, (A_ScreenWidth/2), (A_ScreenHeight)
exitapp
w14:
winhide A
winget, state, MinMax, A
WinGetPos,,, Width, Height, A
WinMove, A,, 0, 0, (A_ScreenWidth/2), (A_ScreenHeight/2)
exitapp
w15:
winhide A
winget, state, MinMax, A
WinGetPos,,, Width, Height, A
WinMove, A,, (A_ScreenWidth/2), 0, (A_ScreenWidth/2), (A_ScreenHeight/2)
exitapp
w16:
winhide A
winget, state, MinMax, A
WinGetPos,,, Width, Height, A
WinMove, A,, 0, (A_ScreenHeight/2), (A_ScreenWidth/2), (A_ScreenHeight/2)
exitapp
w17:
winhide A
winget, state, MinMax, A
WinGetPos,,, Width, Height, A
WinMove, A,, (A_ScreenWidth/2), (A_ScreenHeight/2), (A_ScreenWidth/2), (A_ScreenHeight/2)
exitapp