autoease.device.xbox.xbox module

@author: meili @contact: meili02@corp.netease.com @file: win.py @date: 2023/2/20 17:59 @desc:

class autoease.device.xbox.xbox.XBOX_GamePad_TO_CODE[source]

Bases: object

RIGHT_THUMBSTICK = 32768
LEFT_THUMBSTICK = 16384
RIGHT_SHOULDER = 8192
LEFT_SHOULDER = 4096
DPAD_RIGHT = 2048
DPAD_LEFT = 1024
DPAD_DOWN = 512
DPAD_UP = 256
Y = 128
X = 64
B = 32
A = 16
VIEW = 8
MENU = 4
NEXUS = 2
ENROLL = 1
NONE = 0
class autoease.device.xbox.xbox.Xbox(ip, http_port=11443, game_project_name=None, is_record=True, file_manager: Optional[FileManager] = None, xbox_gdk_bin='C:\\Program Files (x86)\\Microsoft GDK\\bin', **kwargs)[source]

Bases: Device

Xbox client.

property get_game_name
property get_game_path
property get_game_log_path
property get_screenshot_file_list
property get_video_file_list
set_process_fronted()[source]
check_process_alive() bool[source]
playback_record()[source]
stop_record()[source]
key_press(key, duration=0.05, **kwargs)[source]
key_up(key, **kwargs)[source]
key_down(key, **kwargs)[source]
input_reset()[source]
key_write(text, duration=None, **kwargs)[source]
input_console_command(command: str, platform: str = 'unreal')[source]
img_exist(image: Template, **kwargs)[source]
img_assert_exists(image: Template, **kwargs)[source]
img_assert_not_exists(image: Template, **kwargs)[source]
ocr_exist_sentence(word_list: list, **kwargs)[source]
ocr_assert_exist_sentence(word_list: list, **kwargs)[source]
ocr_exist_sentence_on_screen_rectangle(x1: int, y1: int, x2: int, y2: int, word_list: list, **kwargs)[source]
gamepad_button_down(button)[source]
gamepad_button_up(button)[source]
gamepad_button_press(button, duration=0.05)[source]
gamepad_left_joystick_set(x_value: float, y_value: float, duration=0.05)[source]
gamepad_left_joystick_set_and_reset(x_value: float, y_value: float, duration=0.05)[source]
gamepad_right_joystick_set(x_value: float, y_value: float, duration=0.05)[source]
gamepad_right_joystick_set_and_reset(x_value: float, y_value: float, duration=0.05)[source]
gamepad_left_trigger_set(value: float, duration=0.05)[source]
gamepad_left_trigger_set_and_reset(value: float, duration=0.05)[source]
gamepad_right_trigger_set(value, duration)[source]
gamepad_right_trigger_set_and_reset(value, duration)[source]
screenshot() str[source]
screenshot_return_bytes() bytes[source]
wait_for_keyword(keyword, log_file_path, timeout=20, is_rematch=False, opfunc=None, **kwargs)[source]