Skip to content

Commit

Permalink
Merge pull request #15 from newellista/focus-to-activate
Browse files Browse the repository at this point in the history
Update examples for active windows
  • Loading branch information
asweigart committed Oct 4, 2020
2 parents 0df2ae2 + f6905e4 commit 03374bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ PyGetWindow has functions for obtaining ``Window`` objects from a place on the s
(Win32Window(hWnd=67206), Win32Window(hWnd=66754), Win32Window(hWnd=329210), Win32Window(hWnd=1114374), Win32Window(hWnd=852550), Win32Window(hWnd=132508), Win32Window(hWnd=66964), Win32Window(hWnd=66882), Win32Window(hWnd=197282), Win32Window(hWnd=393880), Win32Window(hWnd=66810), Win32Window(hWnd=328466), Win32Window(hWnd=395034), Win32Window(hWnd=132928), Win32Window(hWnd=65882))


``Window`` objects can be minimized/maximized/restored/focused/resized/moved/closed and also have attributes for their current position, size, and state.
``Window`` objects can be minimized/maximized/restored/activated/resized/moved/closed and also have attributes for their current position, size, and state.

>>> notepadWindow = gw.getWindowsWithTitle('Untitled')[0]
>>> notepadWindow.isMaximized
Expand All @@ -46,7 +46,7 @@ PyGetWindow has functions for obtaining ``Window`` objects from a place on the s
>>> notepadWindow.restore()
>>> notepadWindow.minimize()
>>> notepadWindow.restore()
>>> notepadWindow.focus()
>>> notepadWindow.activate()
>>> notepadWindow.resize(10, 10) # increase by 10, 10
>>> notepadWindow.resizeTo(100, 100) # set size to 100x100
>>> notepadWindow.move(10, 10) # move 10 pixels right and 10 down
Expand Down

0 comments on commit 03374bd

Please sign in to comment.