Autogui Resizing

08/14/2013 02:21 Liented#1
I think I've figured out how control resizing works with autoit-gui.102.12 Perhaps this example will help others. Heh, try coding the same thing in VisualBasic with only 30 lines of code.
Code:
$title = "Example of control resizing"
$info = "Try resizing this window"
Opt("TrayIconHide", 1)
GUICreate($title, 600,300, 50, 50, 0x04CF0000, 0x00000110)

$nw = GUISetControl ("button", "north-west",   0,  0,   200,100)
$n  = GUISetControl ("button", "north",      200,  0,   200,100)
$ne = GUISetControl ("button", "north-east", 400,  0,   200,100)
$w  = GUISetControl ("button", "west",         0,100,   200,100)
$co = GUISetControl ("edit",   $info,        200,100,   200,100)
$e  = GUISetControl ("button", "east",       400,100,   200,100)
$sw = GUISetControl ("button", "south-west",   0,200,   200,100)
$s  = GUISetControl ("button", "south",      200,200,   200,100)
$se = GUISetControl ("button", "south-east", 400,200,   200,100)

GUISetControlEx ($nw,   0,   2+32)
GUISetControlEx ($n,    0,   32)
GUISetControlEx ($ne,   0,   4+32)
GUISetControlEx ($w,    0,   2)
GUISetControlEx ($co, 256,   0)
GUISetControlEx ($e,    0,   4)
GUISetControlEx ($sw,   0,   2+64)
GUISetControlEx ($s,    0,   64)
GUISetControlEx ($se,   0,   4+64)

WinActivate($title)
GUIWaitClose()
WinSetState($title,"", @SW_HIDE);speeds up appearance of closing
Exit