Windows
Windows module for autopylot.This module contains functions that are specific to Windows.
Examples:
>>> from autopylot import windows
>>> windows.show_desktop()
>>> windows.get_active_window()
'Notepad'
>>> windows.get_all_opened_window_titles()
['Notepad', 'Program Manager', 'Desktop']
>>> windows.maximize_window(window_name='Notepad')
>>> windows.minimize_window(window_name='Notepad')
>>> windows.close_window(window_name='Notepad')
>>> windows.launch_app(path='Notepad')
The module contains the following functions:
show_desktop(): Show the desktop.get_active_window(): Get the active window.activate_window(window_name)- activate a window.get_all_opened_window_titles(): Get all opened windows.maximize_window(window_name): Maximize a window.minimize_window(window_name): Minimize a window.close_window(window_name): Close a window.launch_app(path): Launch any windows application by its path or name.
activate_window(window_name)
close_window(window_name)
get_active_window()
get_all_opened_window_titles()
launch_app(path)
Launch any exe/bat application
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path |
str || WindowsPath
|
Path to exe/bat application or application name |
required |
Returns:
| Type | Description |
|---|---|
None
|
None |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If path is not found |
ValueError
|
If path is empty |
Examples: