Advertisement
masa-

AutoHotkey - Resize a window

Mar 30th, 2022
1,837
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. ResizeWin(Width = 0,height = 0)
  3. {
  4.     WinGetPos,X,Y,W,H,A
  5.  
  6.     If %Width% = 0
  7.         Width := W
  8.  
  9.     If %Height% = 0
  10.         Height := H
  11.  
  12. ;   WinSet, Style, ^0xC00000, A ;  Remove the active window's title bar (WS_CAPTION).
  13.  
  14. ;   WinGet, Var, Style, A
  15. ;   MsgBox, 4,, Style: %Var%
  16.  
  17.     WinMove,A,,%X%,%Y%,%Width%,%Height%
  18. ;   WinSet, Redraw
  19. ;   WinHide, A
  20. ;   WinShow, A
  21. }
  22.  
  23. ;^!7::ResizeWin(1280,720)
  24. ;^!7::ResizeWin(1296,758)
  25. ;LControl&LAlt&7::ResizeWin(1296,758)
  26.  
  27. ; Windows 7
  28. ;<^<!7::ResizeWin(1296,758)
  29.  
  30. ; Windows 10 - Press: Ctrl + Alt + 7
  31. <^<!7::ResizeWin(1296,759)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement