Skip to content
Merged

Dev #57

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions autocontrol_driver/generate_autocontrol_driver.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import sys

from je_auto_control import start_autocontrol_socket_server

try:
server = start_autocontrol_socket_server()
while not server.close_flag:
pass
else:
sys.exit(0)
except Exception as error:
print(repr(error))
Binary file not shown.
2 changes: 1 addition & 1 deletion dev_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="je_auto_control_dev",
version="0.0.41",
version="0.0.44",
author="JE-Chen",
author_email="[email protected]",
description="auto testing",
Expand Down
17 changes: 11 additions & 6 deletions je_auto_control/utils/executor/action_executor.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import sys
import types

from je_auto_control import keys_table, press_key, release_key, hotkey, type_key, write
from je_auto_control import press_key, release_key, hotkey, type_key, write, record, stop_record
from je_auto_control import locate_all_image, locate_and_click, locate_image_center
from je_auto_control import mouse_table, check_key_is_press, position, press_mouse, release_mouse, click_mouse, scroll
from je_auto_control import check_key_is_press, position, press_mouse, release_mouse, click_mouse, scroll
from je_auto_control import set_position
from je_auto_control import screenshot, size, special_table
from je_auto_control import screenshot, size
from je_auto_control.utils.exception.exception_tag import action_is_null_error, add_command_exception_tag, \
executor_list_error
from je_auto_control.utils.exception.exception_tag import cant_execute_action_error
Expand All @@ -14,6 +14,8 @@
from je_auto_control.utils.html_report.html_report_generate import generate_html
from je_auto_control.utils.json.json_file import read_action_json
from je_auto_control.utils.test_record.record_test_class import record_action_to_list, test_record_instance
from je_auto_control.wrapper.auto_control_keyboard import get_special_table, get_keys_table
from je_auto_control.wrapper.auto_control_mouse import get_mouse_table


class Executor(object):
Expand All @@ -25,15 +27,15 @@ def __init__(self):
"mouse_right": click_mouse,
"mouse_middle": click_mouse,
"click_mouse": click_mouse,
"mouse_table": mouse_table,
"mouse_table": get_mouse_table,
"position": position,
"press_mouse": press_mouse,
"release_mouse": release_mouse,
"scroll": scroll,
"set_position": set_position,
"special_table": special_table,
"special_table": get_special_table,
# keyboard
"keys_table": keys_table,
"keys_table": get_keys_table,
"type_key": type_key,
"press_key": press_key,
"release_key": release_key,
Expand All @@ -51,6 +53,9 @@ def __init__(self):
"set_record_enable": test_record_instance.set_record_enable,
# generate html
"generate_html": generate_html,
# record
"record": record,
"stop_record": stop_record,
}

def _execute_event(self, action: list):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sys
import json
import socketserver
import sys
import threading

from je_auto_control.utils.executor.action_executor import execute_action
Expand Down
10 changes: 9 additions & 1 deletion je_auto_control/wrapper/auto_control_keyboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,20 @@
from je_auto_control.utils.exception.exception_tag import table_cant_find_key
from je_auto_control.utils.exception.exceptions import AutoControlCantFindKeyException
from je_auto_control.utils.exception.exceptions import AutoControlKeyboardException
from je_auto_control.wrapper.platform_wrapper import keyboard
from je_auto_control.wrapper.platform_wrapper import keyboard, special_table
from je_auto_control.wrapper.platform_wrapper import keyboard_check
from je_auto_control.wrapper.platform_wrapper import keys_table
from je_auto_control.utils.test_record.record_test_class import record_action_to_list


def get_special_table():
return special_table


def get_keys_table():
return keys_table


def press_key(keycode: [int, str], is_shift: bool = False, skip_record: bool = False) -> str:
"""
use to press a key still press to use release key
Expand Down
4 changes: 4 additions & 0 deletions je_auto_control/wrapper/auto_control_mouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
from je_auto_control.utils.test_record.record_test_class import record_action_to_list


def get_mouse_table():
return mouse_table


def mouse_preprocess(mouse_keycode: [int, str], x: int, y: int) -> Tuple[Union[int, str], int, int]:
"""
check mouse keycode is verified or not
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="je_auto_control",
version="0.0.107",
version="0.0.110",
author="JE-Chen",
author_email="[email protected]",
description="auto testing",
Expand Down