Skip to content
themixray edited this page Nov 21, 2021 · 2 revisions

Initialization

Finding window by title.

ew32g.window(title)

Returns window

Get window hwnd

HWND is a "handle to a window" and is part of the Win32 API.

window.hwnd

Returns int

Focus window

Bring window to top, set foreground window.

window.focus()

Returns None

Show window

Show window after hiding window.

window.show()

Returns None

Hide window

Hide window bebfore showing window.

window.hide()

Returns None

Move window

Move window to absolute coordinates.

window.move(x, y)

Returns None

Resize window

Change size of window.

window.resize(width, height)

Returns None

Minimize window

Make the minimum available window size.

window.minimize()

Returns tuple

Maximize window

Make the maximum available window size.

window.maximize()

Returns tuple

Get window title

window.title

Returns str

Is window visible

To change this value, there are a hide() and show().

window.visible

Returns bool

Get window position

To change this value, there is a move function.

window.position

Returns tuple

Get window size

To change this value, there is a resize function.

window.size

Returns tuple

Screenshot window

window.screenshot(path)

Returns str

Сenter the window

Position the window in the center of the screen/specified coordinates.

window.center(x=SCREEN_WIDTH,y=SCREEN_HEIGHT)

Returns None

Destroy the window

To be honest, I haven't tested this function, but it should work.

window.destroy()

Returns None