Skip to content

Commit 62d53a5

Browse files
authored
Merge pull request #8 from JE-Chen/dev
fix error & refactor
2 parents e8883bc + 9f083c1 commit 62d53a5

File tree

7 files changed

+45
-98
lines changed

7 files changed

+45
-98
lines changed

.idea/Python_JEAutoControl.iml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

Lines changed: 36 additions & 91 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

je_auto_control/windows/keyboard/win32_keyboard_check.py renamed to je_auto_control/windows/core/utils/win32_keypress_check.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
import ctypes
1010

1111

12-
def check_key_is_press(keycode: int):
12+
def check_key_is_press(keycode: [int, str]):
1313
if type(keycode) is int:
1414
temp = ctypes.windll.user32.GetKeyState(keycode)
1515
else:
1616
temp = ctypes.windll.user32.GetKeyState(ord(keycode))
1717
if temp > 1:
1818
return True
19+
return False

je_auto_control/wrapper/platform_wrapper.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@
170170
from je_auto_control.windows.core.utils.win32_vk import win32_keyY
171171
from je_auto_control.windows.core.utils.win32_vk import win32_keyZ
172172
from je_auto_control.windows.keyboard import win32_ctype_keyboard_control
173-
from je_auto_control.windows.keyboard import win32_keyboard_check
174173
from je_auto_control.windows.mouse import win32_ctype_mouse_control
175174
from je_auto_control.windows.mouse.win32_ctype_mouse_control import win32_mouse_left
176175
from je_auto_control.windows.mouse.win32_ctype_mouse_control import win32_mouse_middle
@@ -179,6 +178,7 @@
179178
from je_auto_control.windows.mouse.win32_ctype_mouse_control import win32_mouse_x2
180179
from je_auto_control.windows.screen import win32_screen
181180
from je_auto_control.windows.record.win32_record import win32_recorder
181+
from je_auto_control.windows.core.utils import win32_keypress_check
182182

183183
elif sys.platform in ["darwin"]:
184184
from je_auto_control.osx.core.utils.osx_vk import osx_key_a, osx_key_A
@@ -284,7 +284,6 @@
284284
from je_auto_control.osx.screen import osx_screen
285285
from je_auto_control.osx.keyboard import osx_keyboard
286286
from je_auto_control.osx.keyboard import osx_keyboard_check
287-
from je_auto_control.osx.record.osx_record import osx_recorder
288287

289288
elif sys.platform in ["linux", "linux2"]:
290289
from je_auto_control.linux_with_x11.core.utils.x11_linux_vk import x11_linux_key_backspace
@@ -697,7 +696,7 @@
697696
"mouse_x2": win32_mouse_x2
698697
}
699698
keyboard = win32_ctype_keyboard_control
700-
keyboard_check = win32_keyboard_check
699+
keyboard_check = win32_keypress_check
701700
mouse = win32_ctype_mouse_control
702701
screen = win32_screen
703702
recorder = win32_recorder

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.66",
8+
version="0.0.69",
99
author="JE-Chen",
1010
author_email="zenmailman@gmail.com",
1111
description="auto testing",

todo.je

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
check ide refactor
2+
refactor

0 commit comments

Comments
 (0)