Change-Window-Size
Command Description
Change the size of a window (in pixel)
Command Prototype
Window.SetSize(objUiElement,w,h)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
objUiElement | True | decorator | @ui"" | Corresponding window object; when passed as an integer, it is used as a window handle; when passed as a string, it is used as a window feature to find all matched window to operate; when passed as a UiElement object, operate the window containing it |
w | True | number | 800 | Window width |
h | True | number | 600 | Window height |
Demo
TracePrint "--------------------Resize window--------------------"
// --------------------------------------------------------
// [Remarks] To change the window size, this Demo uses IE to open Baidu
// Input parameter 1:
// objUiElement--target element
// Input parameter 2:
// w--width
// Input parameter 3:
// h--height
// Command prototype: Window.SetSize(objUiElement,w,h)
// --------------------------------------------------------
Window.SetSize(@ui"window_Baidu, you will know-user configuration 1-MicrosoftEdge5",800,600)