Minimize, maximize, restore window

Syntax1 - set state

min [window]
max [window]
res [window]

 

Syntax2 - get state

int min([window])
int max([window])
int res([window])

 

Parts

window - top-level or child window. Default: active window.

 

Remarks

Syntax1

Minimizes (min), maximizes (max) or restores (res) window.

 

If the window is minimized, res restores it to previous state, which can be restored or maximized. If the window is maximized, res restores it to restored state.

 

Syntax2

Returns 1 if window is minimized (min), maximized (max) or restored (res). If not, returns 0.

 

Example

min "Notepad" ;;minimize "Notepad" window

 restore "Notepad" window to previous state if it is minimized
int hwnd=win("Notepad")
if(min(hwnd)) res hwnd