Jump to content

Windows Resizer


Generator
 Share

Recommended Posts

Windows Resizer

Ever want to resize a game windows? or some windows you normally can't be resized? Now with the Windows Resizer you can resize windows to suit your case easily.

Just hit Ctrl+Left Click at the window to get the Title of the window you want, and click Capture, move your mouse as your sizing tool. After, just click resize and the windows will be moved to where you want it to be.

*Wanring: For some game windows, control's pos may not be resized, please re-consider.

Anyways i made this because sometimes i had to resize the game windows but it won't allow me to do it, though i can just open autoit and use winmove, but entering all the parameter is annoying. So then i came up with this idea. Worked well too.

Feel free to comment and improve the code, or download attachment below.

#include<GUIConstants.au3>
#include<misc.au3>
If _Singleton(&quÝÕÚ[ÝÜÈÚ^][ÝËJHH[Q^][YÜ
    ][ÝÑÕRSÛ][[ÙIV÷C²Â¤÷BgV÷CµvåFFÆTÖF6ÖöFRgV÷C²Â"¤÷BgV÷CµG&ÖVçTÖöFRgV÷C²Ì¤)=ÁÐ ÅÕ½ÐíU%
±½Í=¹ÍÅÕ½Ðì°À¤)±½°ÀÌØíQ¥Ñ±ôÅÕ½ÐìÅÕ½Ðì)±½al $Value = 0
Global $Pos1, $Pos2, $w, $h
$guHHÕRPÜX]J  ][ÝÕÚ[ÝÜÈÚ^][ÝËMK
NLKLKLJBÌÍÚ[]ÒuT7G&Ä7&VFTçWBgV÷Cµ÷W"væF÷w2FFÆRgV÷C²Â"Â2Â#Â#¢b33c¶'Ñѽ¸ôU%
Ñɱ
ÉÑ    ÕÑѽ¸ ÅÕ½Ðí
ÁÑÕÉÅÕ½Ðì°Ô°ÈÔ°ÄÀÀ°ÌÀ¤(ÀÌØíÕÑѽ0 = GUICtrlCreateButton("Resize", 110, 25, 100, 30)
GUISetOnEvent   ÌÍÑÕRWÑUSÐÓÔÑK ][ÝÔ]Z]   ][ÝÊBÕRPÝÙ]Û][
    ÌÍØ]Û   V÷Cµô6GW&RgV÷C²¤uT7G&Å6WDöäWfVçBb33c¶'WGFöãÂgV÷Cµõ&W6¦RgV÷C²¤u%
ÑɱMÑ1¥µ¥Ð ÀÌØí¥¹ÁÕаÈÀÀ¤)U%
ÑɱMÑQ¥À ÀÌØí¥¹ÁÕаÅÕ½Ðí
ÑÉ°­1Ðlick to get Windows Title", "Help", 1, 1)
GUICtrlSetFont(&#0ÍØ]ÛK
    ][ÝÕZÛXI][ÝÊBÕRPÝÙ]Û
    ÌÍØ]ÛK
ÂÂgV÷CµFöÖgV÷C²¤uT7G&Å6WDföçBb33c¶çWBÂÂCÂÂgV÷CµFµÅÕ½Ðì¤)U%Mѽ¹Ð ä°ÐÀÀ°À°ÅÕ½ÐíQ¡½µÅÕ½Ðì¤)U%
ÑɱMÑMÑÑ ÀÌØítton0, $GUI_DISABLE)
GUISetState()
WinSetOnTop($gui, ""JBÚ[HBWÐÚXÚÊ
BRYÒÔÜÙY
    ][ÝÌI][ÝÊH[ÒÔÜÙY
    ][ÝÐ"gV÷C²FVà b33cµvæÆ7BÒväÆ7B f÷"b33c¶Æ7BÒFòb33cµvæ¥ÍÑlÁulÁt($$%%]¥¹Ñ¥Ù ÀÌØí]¥¹±¥ÍÑlÀÌØí±¥ÍÑulÅt¤Q¡¸($$$$ÀÌØí]¥¹Qtle = $Winlist[$list][0]
            EndIf
        Next
        ControlFocus($gui   ][ÝÉ][ÝË    ][ÝÑY]I][ÝÊBBPÛÛÛÙ]^
    ÌÍÙÝZK  ][ÝÉ][ÝËgV÷C´VFCgV÷C²Âb33cµvåFFÆR VæD` 6ÆVW¥tVæ@¤gVæ2VB WÐ)¹Õ¹ìôôÐíEÕ¥Ð)Õ¹}Q½½±Q¥À ¤(%Q½½±Q¥À ÀÌØíQ¥Ñ±µÀìÅÕ½ÐìÝs not found", Default, Default, "Windows Resizer", 1, 1)
    SlY
L
BUÛÛ
    ][ÝÉ][ÝÊB[[ÈÏOIÝ×ÕÛÛ[ÈÐÚXÚÊ
BIÌ3cµFFÆRÒuT7G&Å&VBb33c¶çWB &WGW&âb33cµFFÆP¤VæDgVæ2³ÓÒfwCµô6¬)Õ¹}
ÁÑÕÉ ¤(%U%
ÑɱMÑMÑÑ ÀÌØíÕÑѽ¸°ÀÌØíU%}%M    1¤(%U%
rlSetState($button0, $GUI_DISABLE)
    Do
        Sleep(1)
    Until _IsPressY
    ][ÝÌI][ÝÊBRYÒÔÜÙY
    ][ÝÌI][ÝÊH[BIÌÍÔÜÌHH[ÝÙQWE÷2 Fð b33c¶7W'&VçG÷2ÒÖ÷W6TvWE÷2 FööÅFb33c¶7W'&VçG÷lÁtµÀìÅÕ½Ðì°ÅÕ½ÐìµÀìÀÌØíÕÉɹÑÁ½ÍlÅt¤($%U¹Ñ¥°9½Ð}%ÍAÉÍÍ uot;01")
        ToolTip("")
        $Pos2 = MouseGetPos()
        If &#0ÍÔÜÌÌH   È  ÌÍÔÜÌVÌH[BBWÔ]ÙJ
BBBIÌÍÕ[YHHBQ[ÙBôæ÷&Ö b33cµfÇVRÒ VæD` VæD` uT7G&Å6WE7FFRb33c¶'WGFöâÀÌØíU%}9  1¤(%U%
ÑɱMÑMÑÑ ÀÌØíÕÑѽ¸À°ÀÌØíU%}9   1¤)¹Õ¹   ;==>_Capture
Func _Normal()
    $w = $Pos2[0] - $Pos1[0]
IÌÍÚH    ÌÍÔÜÌÌWHH ÌÍÔÜÌVÌWB[[ÈÏOIÝ×ÓÜX[[ÈÔ]'6R b33c·rÒb33cµ÷3³ÒÒb33cµ÷3%³Ð b33c¶Òb33cµ÷3³ÒÒbÀÌØíA½ÌÉlÅt)¹Õ¹ìôôÐí}IÙÉÍ)Õ¹}IÍ¥é ¤(%%9½Ð]¥¹á¥ÍÑÌ ÀÌ;Title, "") Then
        _ToolTip()
        Return
    EndIf
    If Not $Value[BUÚ[[ÝJ ÌÍÕ]K    ][ÝÉ][ÝË    ÌÍÔÜÌÌK   ÌÍÔÜÌÌWK  Ì3c·rÂb33c¶ VÇ6P väÖ÷fRb33cµFFÆRÂgV÷C²gV÷C²Âb33cµ÷3³ÒÂb3ÌØíA½ÌÅlÅt°ÀÌØíÜ°ÀÌØí ¤(%¹%)¹Õ¹ìôôÐí}IÍ¥é

Windows_Resizer.au3

Edit: Fixed Bugs.

Edited by Generator
Link to comment
Share on other sites

Thank you, nice work and idea :rolleyes:

Feature request/suggestion :

Dropdown history list on input box of previously resized windows for quickly selecting a window to resize.

Set the gui to Topmost so it's always on top.

I tried it on windows calculator , notepad, scite but the capture doesn't seem to see the or fill in the window title into the input box.

But manually type the title and hit resize and it reduces the window to 1/2 the width.

I must be doing something wrong

Cheers

Link to comment
Share on other sites

  • Moderators

Anymore comments?

Get the client size to reduce in correlation as well, and you'd have something there. Other than that, I don't see anything that WinMove() couldn't do on it's own.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...