Skip to content

Commit 2de5fa2

Browse files
authored
Merge pull request #57 from JE-Chen/dev
Dev
2 parents 4715d66 + c488c7b commit 2de5fa2

File tree

9 files changed

+49
-13
lines changed

9 files changed

+49
-13
lines changed

.idea/workspace.xml

Lines changed: 18 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
import sys
2+
13
from je_auto_control import start_autocontrol_socket_server
24

35
try:
46
server = start_autocontrol_socket_server()
57
while not server.close_flag:
68
pass
9+
else:
10+
sys.exit(0)
711
except Exception as error:
812
print(repr(error))
52.2 MB
Binary file not shown.

dev_setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="je_auto_control_dev",
8-
version="0.0.41",
8+
version="0.0.44",
99
author="JE-Chen",
1010
author_email="zenmailman@gmail.com",
1111
description="auto testing",

je_auto_control/utils/executor/action_executor.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import sys
22
import types
33

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

1820

1921
class Executor(object):
@@ -25,15 +27,15 @@ def __init__(self):
2527
"mouse_right": click_mouse,
2628
"mouse_middle": click_mouse,
2729
"click_mouse": click_mouse,
28-
"mouse_table": mouse_table,
30+
"mouse_table": get_mouse_table,
2931
"position": position,
3032
"press_mouse": press_mouse,
3133
"release_mouse": release_mouse,
3234
"scroll": scroll,
3335
"set_position": set_position,
34-
"special_table": special_table,
36+
"special_table": get_special_table,
3537
# keyboard
36-
"keys_table": keys_table,
38+
"keys_table": get_keys_table,
3739
"type_key": type_key,
3840
"press_key": press_key,
3941
"release_key": release_key,
@@ -51,6 +53,9 @@ def __init__(self):
5153
"set_record_enable": test_record_instance.set_record_enable,
5254
# generate html
5355
"generate_html": generate_html,
56+
# record
57+
"record": record,
58+
"stop_record": stop_record,
5459
}
5560

5661
def _execute_event(self, action: list):

je_auto_control/utils/socket_server/auto_control_socket_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import sys
21
import json
32
import socketserver
3+
import sys
44
import threading
55

66
from je_auto_control.utils.executor.action_executor import execute_action

je_auto_control/wrapper/auto_control_keyboard.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,20 @@
1010
from je_auto_control.utils.exception.exception_tag import table_cant_find_key
1111
from je_auto_control.utils.exception.exceptions import AutoControlCantFindKeyException
1212
from je_auto_control.utils.exception.exceptions import AutoControlKeyboardException
13-
from je_auto_control.wrapper.platform_wrapper import keyboard
13+
from je_auto_control.wrapper.platform_wrapper import keyboard, special_table
1414
from je_auto_control.wrapper.platform_wrapper import keyboard_check
1515
from je_auto_control.wrapper.platform_wrapper import keys_table
1616
from je_auto_control.utils.test_record.record_test_class import record_action_to_list
1717

1818

19+
def get_special_table():
20+
return special_table
21+
22+
23+
def get_keys_table():
24+
return keys_table
25+
26+
1927
def press_key(keycode: [int, str], is_shift: bool = False, skip_record: bool = False) -> str:
2028
"""
2129
use to press a key still press to use release key

je_auto_control/wrapper/auto_control_mouse.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
from je_auto_control.utils.test_record.record_test_class import record_action_to_list
2020

2121

22+
def get_mouse_table():
23+
return mouse_table
24+
25+
2226
def mouse_preprocess(mouse_keycode: [int, str], x: int, y: int) -> Tuple[Union[int, str], int, int]:
2327
"""
2428
check mouse keycode is verified or not

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="je_auto_control",
8-
version="0.0.107",
8+
version="0.0.110",
99
author="JE-Chen",
1010
author_email="zenmailman@gmail.com",
1111
description="auto testing",

0 commit comments

Comments
 (0)