Commands & Syntax > Commands > Window Manipulation >

RESIZE - < winresize >() ... [Pro]

www.perfectkeyboard.com

 

Window RESIZE
<winresize>("Window",Match,Width,Height)
Available in: Professional edition

The command resizes specified window.

 

#

Parameter name

Parameter description

1

Window

Window identifier in form of Window Identification Path (WIP) or HWND. It identifies the window that is to be closed.

2

Match

Takes effect only if a window is identified using WIP parameter. Can be one of these values:
0 - match substrings in WIP
1 - match exact strings in WIP

3

Width

Desired window's width

4

Height

Desired window's height

 

Example (Macro Steps):

 

1

<#> <#> This macro resizes "Notepad" window to size 300x200

2

Macro execution: ONLY COMMANDS

3

IF WINDOW "[*Notepad|Notepad|#0|#0]" Is Open (Match=Partial)

4

Window RESIZE "[*Notepad|Notepad|#0|#0]" to [ Width=300, Height=200 ]

5

ELSE activate

6

Message SHOW "" : "'Notepad' is not opened!" (other parameters: x = 100, y = 100, Window title = Message, Buttons = OK, Timeout (seconds) = , Always on top = ).

7

ENDIF

Example (Plain Text):

 

<#> This macro resizes "Notepad" window to size 300x200

<#>

<cmds>

 

<if_win>("[*Notepad|Notepad|#0|#0]","OPEN",0)

   <winresize>("[*Notepad|Notepad|#0|#0]",0,300,200)

<else>

   <msg>(100,100,"'Notepad' is not opened!","Message",1)

<endif>