Module my_autopylot.mouse39

Functions

def mouse_click(x='', y='', left_or_right='left', no_of_clicks=1, type_of_movement='abs')

Description

Clicks at the given X Y Co-ordinates on the screen using single / double / triple click(s). Default clicks on current position.

Args

x : int
x-coordinate on screen.
Eg
369 or 435, Defaults: ''.
y : int
y-coordinate on screen.
Eg
369 or 435, Defaults: ''.
left_or_right : str, optional
Which mouse button.
Eg
right or left, Defaults: left.
no_of_click : int, optional
Number of times specified mouse button to be clicked.
Eg
1 or 2, Max 3. Defaults: 1.

Returns

[status] status (bool): Whether the function is successful or failed.

def mouse_drag_from_to(x1='', y1='', x2='', y2='')

Description

Clicks and drags from x1 y1 co-ordinates to x2 y2 Co-ordinates on the screen

Args

x1 or x2 (int): x-coordinate on screen.
Eg
369 or 435, Defaults: ''.
y1 or y2 (int): y-coordinate on screen.
Eg
369 or 435, Defaults: ''.
delay : float, optional
Seconds to wait while performing action.
Eg
1 or 0.5, Defaults to 0.5.

Returns

[status] status (bool): Whether the function is successful or failed.

def mouse_move(x='', y='', type_of_movement='abs')

Description

Moves the cursor to the given X Y Co-ordinates.

Args

x : int
x-coordinate on screen.
Eg
369 or 435, Defaults: ''.
y : int
y-coordinate on screen.
Eg
369 or 435, Defaults: ''.
type_of_movement : str
Type of movement (Absolute or Relative to current Position).
Eg
abs or rel, Defaults: abs.

Returns

[status] status (bool): Whether the function is successful or failed.

def mouse_search_snip_return_coordinates_x_y(img='', wait=10)

Description

Searches for the given image on the screen and returns the X and Y co-ordinates.

Args

img : str
Image to search for.
wait : int
Seconds to wait while performing action. Defaults to 10.

Returns

[status, data]
status
Whether the function is successful or failed.
data
X and Y co-ordinates of the image.