From cf3b03ddc527c7aed694da91bab846db75321e26 Mon Sep 17 00:00:00 2001
From: JE-Chen <33644111+JE-Chen@users.noreply.github.com>
Date: Fri, 11 Jul 2025 15:26:26 +0800
Subject: [PATCH 1/5] Update dev version
Update dev version
* Add GUI
* Add GUI multi language
---
.idea/workspace.xml | 81 +++++----
je_auto_control/gui/__init__.py | 0
.../gui/language_wrapper/__init__.py | 0
.../gui/language_wrapper/english.py | 19 ++
.../multi_language_wrapper.py | 30 ++++
.../language_wrapper/traditional_chinese.py | 19 ++
je_auto_control/gui/main_widget.py | 167 ++++++++++++++++++
je_auto_control/gui/main_window.py | 24 +++
.../wrapper/auto_control_keyboard.py | 26 +--
je_auto_control/wrapper/auto_control_mouse.py | 4 +-
dev.toml => pyproject.toml | 5 +-
stable.toml | 2 +-
test/unit_test/record/record_test.py | 2 +-
13 files changed, 328 insertions(+), 51 deletions(-)
create mode 100644 je_auto_control/gui/__init__.py
create mode 100644 je_auto_control/gui/language_wrapper/__init__.py
create mode 100644 je_auto_control/gui/language_wrapper/english.py
create mode 100644 je_auto_control/gui/language_wrapper/multi_language_wrapper.py
create mode 100644 je_auto_control/gui/language_wrapper/traditional_chinese.py
create mode 100644 je_auto_control/gui/main_widget.py
create mode 100644 je_auto_control/gui/main_window.py
rename dev.toml => pyproject.toml (94%)
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 1af3995..3b0a0e5 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -5,11 +5,19 @@
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
@@ -84,6 +92,9 @@
"Python.create_project_test.executor": "Run",
"Python.critical_exit_test.executor": "Run",
"Python.executor_one_file.executor": "Run",
+ "Python.main_widget.executor": "Run",
+ "Python.main_window.executor": "Run",
+ "Python.record_test.executor": "Run",
"Python.screen_test.executor": "Run",
"Python.screenshot_test.executor": "Run",
"Python.video_recording.executor": "Run",
@@ -93,6 +104,7 @@
"WebServerToolWindowFactoryState": "false",
"git-widget-placeholder": "dev",
"ignore.virus.scanning.warn.message": "true",
+ "junie.onboarding.icon.badge.shown": "true",
"last_opened_file_path": "C:/CodeWorkspace/Python/AutoControlGUI",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
@@ -119,8 +131,8 @@
-
-
+
+
@@ -129,12 +141,12 @@
-
+
-
+
@@ -143,7 +155,7 @@
-
+
@@ -152,12 +164,12 @@
-
+
-
+
@@ -166,7 +178,7 @@
-
+
@@ -175,12 +187,12 @@
-
+
-
+
@@ -189,7 +201,7 @@
-
+
@@ -198,12 +210,12 @@
-
+
-
+
@@ -212,7 +224,7 @@
-
+
@@ -221,12 +233,12 @@
-
+
-
+
@@ -237,19 +249,19 @@
+
+
+
-
-
-
-
-
+
+
@@ -581,6 +593,10 @@
+
+
+
+
@@ -603,16 +619,19 @@
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/je_auto_control/gui/__init__.py b/je_auto_control/gui/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/je_auto_control/gui/language_wrapper/__init__.py b/je_auto_control/gui/language_wrapper/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/je_auto_control/gui/language_wrapper/english.py b/je_auto_control/gui/language_wrapper/english.py
new file mode 100644
index 0000000..2d2563f
--- /dev/null
+++ b/je_auto_control/gui/language_wrapper/english.py
@@ -0,0 +1,19 @@
+english_word_dict = {
+ # Main
+ "application_name": "AutoControlGUI",
+ # Widget
+ "interval_time": "Interval Time (s):",
+ "cursor_x": "Cursor X Position:",
+ "cursor_y": "Cursor Y Position:",
+ "mouse_button": "Mouse Button:",
+ "keyboard_button": "Keyboard Button:",
+ "click_type": "Click Type:",
+ "input_method": "Input Method:",
+ "mouse_radio": "Mouse",
+ "keyboard_radio": "Keyboard",
+ "repeat_until_stopped_radio": "Repeat until stopped",
+ "repeat_radio": "Repeat",
+ "times": "Times",
+ "start": "Start",
+ "stop": "Stop",
+}
diff --git a/je_auto_control/gui/language_wrapper/multi_language_wrapper.py b/je_auto_control/gui/language_wrapper/multi_language_wrapper.py
new file mode 100644
index 0000000..4842d7d
--- /dev/null
+++ b/je_auto_control/gui/language_wrapper/multi_language_wrapper.py
@@ -0,0 +1,30 @@
+from je_auto_control.gui.language_wrapper.english import english_word_dict
+from je_auto_control.gui.language_wrapper.traditional_chinese import traditional_chinese_word_dict
+from je_auto_control.utils.logging.loggin_instance import autocontrol_logger
+
+
+
+class LanguageWrapper(object):
+
+ def __init__(
+ self
+ ):
+ autocontrol_logger.info("Init LanguageWrapper")
+ self.language: str = "English"
+ self.choose_language_dict = {
+ "English": english_word_dict,
+ "Traditional_Chinese": traditional_chinese_word_dict
+ }
+ self.language_word_dict: dict = self.choose_language_dict.get(self.language)
+
+ def reset_language(self, language) -> None:
+ autocontrol_logger.info(f"LanguageWrapper reset_language language: {language}")
+ if language in [
+ "English",
+ "Traditional_Chinese"
+ ]:
+ self.language = language
+ self.language_word_dict = self.choose_language_dict.get(self.language)
+
+
+language_wrapper = LanguageWrapper()
diff --git a/je_auto_control/gui/language_wrapper/traditional_chinese.py b/je_auto_control/gui/language_wrapper/traditional_chinese.py
new file mode 100644
index 0000000..66e20bb
--- /dev/null
+++ b/je_auto_control/gui/language_wrapper/traditional_chinese.py
@@ -0,0 +1,19 @@
+traditional_chinese_word_dict = {
+ # Main
+ "application_name": "AutoControlGUI",
+ # Widget
+ "interval_time": "間隔時間(秒):",
+ "cursor_x": "滑鼠游標 X 軸位置:",
+ "cursor_y": "滑鼠游標 Y 軸位置:",
+ "mouse_button": "滑鼠按鍵:",
+ "keyboard_button": "鍵盤按鍵:",
+ "click_type": "點擊類型:",
+ "input_method": "輸入方式:",
+ "mouse_radio": "滑鼠",
+ "keyboard_radio": "鍵盤",
+ "repeat_until_stopped_radio": "重複直到停止",
+ "repeat_radio": "重複",
+ "times": "次數",
+ "start": "開始",
+ "stop": "停止",
+}
diff --git a/je_auto_control/gui/main_widget.py b/je_auto_control/gui/main_widget.py
new file mode 100644
index 0000000..e0ded4d
--- /dev/null
+++ b/je_auto_control/gui/main_widget.py
@@ -0,0 +1,167 @@
+from PySide6.QtCore import QTimer
+from PySide6.QtGui import QIntValidator, QKeyEvent, Qt
+from PySide6.QtWidgets import (
+ QWidget, QLineEdit, QComboBox, QPushButton, QVBoxLayout, QLabel,
+ QGridLayout, QHBoxLayout, QRadioButton, QButtonGroup, QMessageBox
+)
+
+from je_auto_control.gui.language_wrapper.multi_language_wrapper import language_wrapper
+from je_auto_control.utils.executor.action_executor import execute_action
+from je_auto_control.wrapper.auto_control_keyboard import type_keyboard
+from je_auto_control.wrapper.auto_control_mouse import click_mouse
+from je_auto_control.wrapper.auto_control_record import record, stop_record
+from je_auto_control.wrapper.platform_wrapper import keyboard_keys_table, mouse_keys_table
+
+
+class AutoControlGUIWidget(QWidget):
+
+ def __init__(self, parent=None):
+ super().__init__(parent)
+
+ main_layout = QVBoxLayout()
+
+ # Grid for input fields
+ grid = QGridLayout()
+
+ # Interval time
+ grid.addWidget(QLabel(language_wrapper.language_word_dict.get("interval_time")), 0, 0)
+ self.interval_input = QLineEdit()
+ self.interval_input.setValidator(QIntValidator())
+ grid.addWidget(self.interval_input, 0, 1)
+
+ # Cursor X/Y
+ grid.addWidget(QLabel(language_wrapper.language_word_dict.get("cursor_x")), 2, 0)
+ self.cursor_x_input = QLineEdit()
+ self.cursor_x_input.setValidator(QIntValidator())
+ grid.addWidget(self.cursor_x_input, 2, 1)
+
+ grid.addWidget(QLabel(language_wrapper.language_word_dict.get("cursor_y")), 3, 0)
+ self.cursor_y_input = QLineEdit()
+ self.cursor_y_input.setValidator(QIntValidator())
+ grid.addWidget(self.cursor_y_input, 3, 1)
+
+ # Mouse button
+ grid.addWidget(QLabel(language_wrapper.language_word_dict.get("mouse_button")), 4, 0)
+ self.mouse_button_combo = QComboBox()
+ self.mouse_button_combo.addItems(mouse_keys_table)
+ grid.addWidget(self.mouse_button_combo, 4, 1)
+
+ # Keyboard button
+ grid.addWidget(QLabel(language_wrapper.language_word_dict.get("keyboard_button")), 5, 0)
+ self.keyboard_button_combo = QComboBox()
+ self.keyboard_button_combo.addItems(keyboard_keys_table.keys())
+ grid.addWidget(self.keyboard_button_combo, 5, 1)
+
+ # Click type
+ grid.addWidget(QLabel(language_wrapper.language_word_dict.get("click_type")), 6, 0)
+ self.click_type_combo = QComboBox()
+ self.click_type_combo.addItems(["Single Click", "Double Click"])
+ grid.addWidget(self.click_type_combo, 6, 1)
+
+ # Input method selection
+ grid.addWidget(QLabel(language_wrapper.language_word_dict.get("input_method")), 7, 0)
+ self.mouse_radio = QRadioButton(language_wrapper.language_word_dict.get("mouse_radio"))
+ self.keyboard_radio = QRadioButton(language_wrapper.language_word_dict.get("keyboard_radio"))
+ self.mouse_radio.setChecked(True)
+ self.input_method_group = QButtonGroup()
+ self.input_method_group.addButton(self.mouse_radio)
+ self.input_method_group.addButton(self.keyboard_radio)
+ grid.addWidget(self.mouse_radio, 7, 1)
+ grid.addWidget(self.keyboard_radio, 7, 2)
+
+ main_layout.addLayout(grid)
+
+ # Repeat options
+ repeat_layout = QHBoxLayout()
+ self.repeat_until_stopped = QRadioButton(language_wrapper.language_word_dict.get("repeat_until_stopped_radio"))
+ self.repeat_count_times = QRadioButton(language_wrapper.language_word_dict.get("repeat_radio"))
+ self.repeat_count_input = QLineEdit()
+ self.repeat_count_input.setValidator(QIntValidator())
+ self.repeat_count_input.setPlaceholderText(language_wrapper.language_word_dict.get("times"))
+ repeat_group = QButtonGroup()
+ repeat_group.addButton(self.repeat_until_stopped)
+ repeat_group.addButton(self.repeat_count_times)
+ self.repeat_until_stopped.setChecked(True)
+ self.repeat_count = 0
+ self.repeat_max = 0
+
+ repeat_layout.addWidget(self.repeat_until_stopped)
+ repeat_layout.addWidget(self.repeat_count_times)
+ repeat_layout.addWidget(self.repeat_count_input)
+ main_layout.addLayout(repeat_layout)
+
+ # Start/Stop buttons
+ button_layout = QHBoxLayout()
+ self.start_button = QPushButton(language_wrapper.language_word_dict.get("start"))
+ self.start_button.clicked.connect(self.start_autocontrol)
+ self.stop_button = QPushButton(language_wrapper.language_word_dict.get("stop"))
+ self.stop_button.clicked.connect(self.stop_autocontrol)
+ button_layout.addWidget(self.start_button)
+ button_layout.addWidget(self.stop_button)
+ main_layout.addLayout(button_layout)
+
+ # Timer
+ self.start_autocontrol_timer = QTimer()
+
+ # Connect input method toggle
+ self.mouse_radio.toggled.connect(self.update_input_mode)
+ self.keyboard_radio.toggled.connect(self.update_input_mode)
+ self.update_input_mode()
+
+ self.setLayout(main_layout)
+
+ def update_input_mode(self):
+ use_mouse = self.mouse_radio.isChecked()
+ self.cursor_x_input.setEnabled(use_mouse)
+ self.cursor_y_input.setEnabled(use_mouse)
+ self.mouse_button_combo.setEnabled(use_mouse)
+ self.keyboard_button_combo.setEnabled(not use_mouse)
+
+ def start_autocontrol(self):
+ self.start_autocontrol_timer.setInterval(int(self.interval_input.text()))
+ self.start_autocontrol_timer.timeout.connect(lambda: self.start_timer_function())
+ self.start_autocontrol_timer.start()
+ self.repeat_max = int(self.repeat_count_input.text())
+
+ def start_timer_function(self):
+ if self.repeat_until_stopped.isChecked():
+ self.trigger_autocontrol_function()
+ elif self.repeat_count_times.isChecked():
+ self.repeat_count += 1
+ if self.repeat_count < self.repeat_max:
+ self.trigger_autocontrol_function()
+ else:
+ self.repeat_count = 0
+ self.repeat_max = 0
+ self.start_autocontrol_timer.stop()
+
+ def trigger_autocontrol_function(self):
+ click_type = self.click_type_combo.currentText()
+ if self.mouse_radio.isChecked():
+ trigger_function = click_mouse
+ button = self.mouse_button_combo.currentText()
+ x = int(self.cursor_x_input.text())
+ y = int(self.cursor_y_input.text())
+ if click_type == "Single Click":
+ trigger_function(mouse_keycode=button, x=x, y=y)
+ elif click_type == "Double Click":
+ trigger_function(mouse_keycode=button, x=x, y=y)
+ trigger_function(mouse_keycode=button, x=x, y=y)
+ elif self.keyboard_radio.isChecked():
+ trigger_function = type_keyboard
+ button = self.keyboard_button_combo.currentText()
+ if click_type == "Single Click":
+ trigger_function(keycode=button)
+ elif click_type == "Double Click":
+ trigger_function(keycode=button)
+ trigger_function(keycode=button)
+
+ def stop_autocontrol(self):
+ self.start_autocontrol_timer.stop()
+
+
+ def keyPressEvent(self, event: QKeyEvent):
+ if event.modifiers() == Qt.KeyboardModifier.ControlModifier and event.key() == Qt.Key.Key_4:
+ self.start_autocontrol_timer.stop()
+ else:
+ super().keyPressEvent(event)
diff --git a/je_auto_control/gui/main_window.py b/je_auto_control/gui/main_window.py
new file mode 100644
index 0000000..6beb779
--- /dev/null
+++ b/je_auto_control/gui/main_window.py
@@ -0,0 +1,24 @@
+import sys
+
+from PySide6.QtWidgets import QMainWindow, QApplication
+from qt_material import QtStyleTools
+
+from je_auto_control.gui.language_wrapper.multi_language_wrapper import language_wrapper
+from je_auto_control.gui.main_widget import AutoControlGUIWidget
+
+
+class AutoControlGUIUI(QMainWindow, QtStyleTools):
+
+ def __init__(self):
+ super().__init__()
+ self.id = language_wrapper.language_word_dict.get("application_name")
+ if sys.platform in ["win32", "cygwin", "msys"]:
+ from ctypes import windll
+ windll.shell32.SetCurrentProcessExplicitAppUserModelID(self.id)
+ self.setStyleSheet(
+ f"font-size: 12pt;"
+ f"font-family: 'Lato';"
+ )
+ self.apply_stylesheet(self, "dark_amber.xml")
+ self.auto_control_gui_widget = AutoControlGUIWidget()
+ self.setCentralWidget(self.auto_control_gui_widget)
diff --git a/je_auto_control/wrapper/auto_control_keyboard.py b/je_auto_control/wrapper/auto_control_keyboard.py
index 8d940af..7c9f589 100644
--- a/je_auto_control/wrapper/auto_control_keyboard.py
+++ b/je_auto_control/wrapper/auto_control_keyboard.py
@@ -1,5 +1,5 @@
import sys
-from typing import Tuple
+from typing import Tuple, Union, LiteralString, Any
from je_auto_control.utils.exception.exception_tags import keyboard_hotkey
from je_auto_control.utils.exception.exception_tags import keyboard_press_key
@@ -25,7 +25,7 @@ def get_keyboard_keys_table() -> dict:
return keyboard_keys_table
-def press_keyboard_key(keycode: [int, str], is_shift: bool = False, skip_record: bool = False) -> str:
+def press_keyboard_key(keycode: Union[int, str], is_shift: bool = False, skip_record: bool = False) -> str | None:
"""
use to press a key still press to use release key
or use critical exit
@@ -81,7 +81,7 @@ def press_keyboard_key(keycode: [int, str], is_shift: bool = False, skip_record:
)
-def release_keyboard_key(keycode: [int, str], is_shift: bool = False, skip_record: bool = False) -> str:
+def release_keyboard_key(keycode: Union[int, str], is_shift: bool = False, skip_record: bool = False) -> str | None:
"""
use to release pressed key return keycode
:param keycode which keycode we want to release
@@ -103,11 +103,11 @@ def release_keyboard_key(keycode: [int, str], is_shift: bool = False, skip_recor
keyboard.release_key(keycode)
elif sys.platform in ["darwin"]:
keyboard.release_key(keycode, is_shift=is_shift)
- if skip_record is False:
+ if not skip_record:
record_action_to_list("release_key", param)
return str(keycode)
except AutoControlKeyboardException as error:
- if skip_record is False:
+ if not skip_record:
record_action_to_list("release_key", param, repr(error))
autocontrol_logger.error(
f"release_keyboard_key, keycode: {keycode}, is_shift: {is_shift}, skip_record: {skip_record}, "
@@ -131,7 +131,7 @@ def release_keyboard_key(keycode: [int, str], is_shift: bool = False, skip_recor
)
-def type_keyboard(keycode: [int, str], is_shift: bool = False, skip_record: bool = False) -> str:
+def type_keyboard(keycode: Union[int, str], is_shift: bool = False, skip_record: bool = False) -> str | None:
"""
press and release key return keycode
:param keycode which keycode we want to type
@@ -146,11 +146,11 @@ def type_keyboard(keycode: [int, str], is_shift: bool = False, skip_record: bool
try:
press_keyboard_key(keycode, is_shift, skip_record=True)
release_keyboard_key(keycode, is_shift, skip_record=True)
- if skip_record is False:
+ if not skip_record:
record_action_to_list("type_keyboard", param)
return str(keycode)
except AutoControlKeyboardException as error:
- if skip_record is False:
+ if not skip_record:
record_action_to_list("type_keyboard", param, repr(error))
autocontrol_logger.error(
f"type_keyboard, keycode: {keycode}, is_shift: {is_shift}, skip_record: {skip_record}, "
@@ -158,7 +158,7 @@ def type_keyboard(keycode: [int, str], is_shift: bool = False, skip_record: bool
)
raise AutoControlKeyboardException(keyboard_type_key + " " + repr(error))
except TypeError as error:
- if skip_record is False:
+ if not skip_record:
record_action_to_list("type_keyboard", param, repr(error))
autocontrol_logger.error(
f"type_keyboard, keycode: {keycode}, is_shift: {is_shift}, skip_record: {skip_record}, "
@@ -166,7 +166,7 @@ def type_keyboard(keycode: [int, str], is_shift: bool = False, skip_record: bool
)
raise AutoControlKeyboardException(repr(error))
except Exception as error:
- if skip_record is False:
+ if not skip_record:
record_action_to_list("type_keyboard", param, repr(error))
autocontrol_logger.error(
f"type_keyboard, keycode: {keycode}, is_shift: {is_shift}, skip_record: {skip_record}, "
@@ -174,7 +174,7 @@ def type_keyboard(keycode: [int, str], is_shift: bool = False, skip_record: bool
)
-def check_key_is_press(keycode: [int, str]) -> bool:
+def check_key_is_press(keycode: [int, str]) -> bool | None:
"""
use to check key is press return True or False
:param keycode check key is press or not
@@ -198,7 +198,7 @@ def check_key_is_press(keycode: [int, str]) -> bool:
)
-def write(write_string: str, is_shift: bool = False) -> str:
+def write(write_string: str, is_shift: bool = False) -> None | LiteralString | str:
"""
use to press and release whole we get this function str
return all press and release str
@@ -257,7 +257,7 @@ def write(write_string: str, is_shift: bool = False) -> str:
)
-def hotkey(key_code_list: list, is_shift: bool = False) -> Tuple[str, str]:
+def hotkey(key_code_list: list, is_shift: bool = False) -> tuple[str, str] | None:
"""
use to press and release all key on key_code_list
then reverse list press and release again
diff --git a/je_auto_control/wrapper/auto_control_mouse.py b/je_auto_control/wrapper/auto_control_mouse.py
index e7f33bd..ce9a0c7 100644
--- a/je_auto_control/wrapper/auto_control_mouse.py
+++ b/je_auto_control/wrapper/auto_control_mouse.py
@@ -24,7 +24,7 @@ def get_mouse_table() -> dict:
return mouse_keys_table
-def mouse_preprocess(mouse_keycode: [int, str], x: int, y: int) -> Tuple[Union[int, str], int, int]:
+def mouse_preprocess(mouse_keycode: Union[int, str], x: int, y: int) -> Tuple[Union[int, str], int, int]:
"""
check mouse keycode is verified or not
and then check current mouse position
@@ -168,7 +168,7 @@ def release_mouse(mouse_keycode: [int, str], x: int = None, y: int = None) -> Tu
)
-def click_mouse(mouse_keycode: [int, str], x: int = None, y: int = None) -> Tuple[Union[int, str], int, int]:
+def click_mouse(mouse_keycode: Union[int, str], x: int = None, y: int = None) -> Tuple[Union[int, str], int, int]:
"""
press and release mouse keycode on x, y
return keycode, x, y
diff --git a/dev.toml b/pyproject.toml
similarity index 94%
rename from dev.toml
rename to pyproject.toml
index a3c5791..69cc945 100644
--- a/dev.toml
+++ b/pyproject.toml
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "je_auto_control_dev"
-version = "0.0.111"
+version = "0.0.114"
authors = [
{ name = "JE-Chen", email = "jechenmailman@gmail.com" },
]
@@ -16,7 +16,6 @@ license-files = ["LICENSE"]
dependencies = [
"je_open_cv",
"pillow",
- "Pyside6==6.9.0",
"pyobjc-core;platform_system=='Darwin'",
"pyobjc;platform_system=='Darwin'",
"python-Xlib;platform_system=='Linux'",
@@ -44,4 +43,4 @@ content-type = "text/markdown"
find = { namespaces = false }
[project.optional-dependencies]
-gui = ["Pyside6", "qt-material"]
+gui = ["PySide6==6.9.1", "qt-material"]
diff --git a/stable.toml b/stable.toml
index 9af4466..e0617f1 100644
--- a/stable.toml
+++ b/stable.toml
@@ -44,4 +44,4 @@ content-type = "text/markdown"
find = { namespaces = false }
[project.optional-dependencies]
-gui = ["Pyside6", "qt-material"]
+gui = ["PySide6==6.9.0", "qt-material"]
diff --git a/test/unit_test/record/record_test.py b/test/unit_test/record/record_test.py
index 67e706b..5be61d3 100644
--- a/test/unit_test/record/record_test.py
+++ b/test/unit_test/record/record_test.py
@@ -18,4 +18,4 @@
record_result = stop_record()
print(record_result)
execute_action(record_result)
-sleep(5)
+sleep(5)
\ No newline at end of file
From e9f0a74eea7a0dfdeb273080b2636361c5f3bb54 Mon Sep 17 00:00:00 2001
From: JE-Chen <33644111+JE-Chen@users.noreply.github.com>
Date: Fri, 11 Jul 2025 16:02:41 +0800
Subject: [PATCH 2/5] Update dev version
Update dev version
* Remove import LiteralString (not on python 3.9, 3.10)
---
je_auto_control/wrapper/auto_control_keyboard.py | 4 ++--
pyproject.toml | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/je_auto_control/wrapper/auto_control_keyboard.py b/je_auto_control/wrapper/auto_control_keyboard.py
index 7c9f589..954a6ff 100644
--- a/je_auto_control/wrapper/auto_control_keyboard.py
+++ b/je_auto_control/wrapper/auto_control_keyboard.py
@@ -1,5 +1,5 @@
import sys
-from typing import Tuple, Union, LiteralString, Any
+from typing import Union
from je_auto_control.utils.exception.exception_tags import keyboard_hotkey
from je_auto_control.utils.exception.exception_tags import keyboard_press_key
@@ -198,7 +198,7 @@ def check_key_is_press(keycode: [int, str]) -> bool | None:
)
-def write(write_string: str, is_shift: bool = False) -> None | LiteralString | str:
+def write(write_string: str, is_shift: bool = False) -> None | str:
"""
use to press and release whole we get this function str
return all press and release str
diff --git a/pyproject.toml b/pyproject.toml
index 69cc945..73b0c67 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "je_auto_control_dev"
-version = "0.0.114"
+version = "0.0.115"
authors = [
{ name = "JE-Chen", email = "jechenmailman@gmail.com" },
]
From ea066e93faaf7fb67a9a4c1b4ec53391df676694 Mon Sep 17 00:00:00 2001
From: JE-Chen <33644111+JE-Chen@users.noreply.github.com>
Date: Fri, 11 Jul 2025 16:29:11 +0800
Subject: [PATCH 3/5] Update dev version
Update dev version
* CI python version from3.9 to 3.12
---
.github/workflows/{dev_python3_9.yml => dev_python3_12.yml} | 4 ++--
.../workflows/{stable_python3_9.yml => stable_python3_12.yml} | 4 ++--
pyproject.toml | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
rename .github/workflows/{dev_python3_9.yml => dev_python3_12.yml} (97%)
rename .github/workflows/{stable_python3_9.yml => stable_python3_12.yml} (97%)
diff --git a/.github/workflows/dev_python3_9.yml b/.github/workflows/dev_python3_12.yml
similarity index 97%
rename from .github/workflows/dev_python3_9.yml
rename to .github/workflows/dev_python3_12.yml
index d84ee04..d512af4 100644
--- a/.github/workflows/dev_python3_9.yml
+++ b/.github/workflows/dev_python3_12.yml
@@ -17,10 +17,10 @@ jobs:
steps:
- uses: actions/checkout@v3
- - name: Set up Python 3.9
+ - name: Set up Python 3.12
uses: actions/setup-python@v3
with:
- python-version: "3.9"
+ python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
diff --git a/.github/workflows/stable_python3_9.yml b/.github/workflows/stable_python3_12.yml
similarity index 97%
rename from .github/workflows/stable_python3_9.yml
rename to .github/workflows/stable_python3_12.yml
index d254d5b..41a4254 100644
--- a/.github/workflows/stable_python3_9.yml
+++ b/.github/workflows/stable_python3_12.yml
@@ -17,10 +17,10 @@ jobs:
steps:
- uses: actions/checkout@v3
- - name: Set up Python 3.9
+ - name: Set up Python 3.12
uses: actions/setup-python@v3
with:
- python-version: "3.9"
+ python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
diff --git a/pyproject.toml b/pyproject.toml
index 73b0c67..6717ff8 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -11,7 +11,7 @@ authors = [
{ name = "JE-Chen", email = "jechenmailman@gmail.com" },
]
description = "GUI Automation Framework"
-requires-python = ">=3.9"
+requires-python = ">=3.10"
license-files = ["LICENSE"]
dependencies = [
"je_open_cv",
@@ -22,7 +22,7 @@ dependencies = [
"mss"
]
classifiers = [
- "Programming Language :: Python :: 3.9",
+ "Programming Language :: Python :: 3.10",
"Development Status :: 2 - Pre-Alpha",
"Environment :: Win32 (MS Windows)",
"Environment :: MacOS X",
From 781c8f1126666a6bd947fa480a96b097754b46df Mon Sep 17 00:00:00 2001
From: JE-Chen <33644111+JE-Chen@users.noreply.github.com>
Date: Fri, 11 Jul 2025 16:45:12 +0800
Subject: [PATCH 4/5] Update dev version
Update dev version
---
pyproject.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyproject.toml b/pyproject.toml
index 6717ff8..b749bae 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "je_auto_control_dev"
-version = "0.0.115"
+version = "0.0.116"
authors = [
{ name = "JE-Chen", email = "jechenmailman@gmail.com" },
]
From c0f35c40d957528d03358548f92968fd3bc8305f Mon Sep 17 00:00:00 2001
From: JE-Chen <33644111+JE-Chen@users.noreply.github.com>
Date: Fri, 11 Jul 2025 16:57:32 +0800
Subject: [PATCH 5/5] Update stable version
Update stable version
---
stable.toml => dev.toml | 17 ++++++++---------
pyproject.toml | 10 +++++-----
2 files changed, 13 insertions(+), 14 deletions(-)
rename stable.toml => dev.toml (78%)
diff --git a/stable.toml b/dev.toml
similarity index 78%
rename from stable.toml
rename to dev.toml
index e0617f1..b749bae 100644
--- a/stable.toml
+++ b/dev.toml
@@ -1,29 +1,28 @@
-# Rename to build stable version
-# This is stable version
+# Rename to build dev version
+# This is dev version
[build-system]
-requires = ["setuptools>=61.0"]
+requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
-name = "je_auto_control"
-version = "0.0.168"
+name = "je_auto_control_dev"
+version = "0.0.116"
authors = [
{ name = "JE-Chen", email = "jechenmailman@gmail.com" },
]
description = "GUI Automation Framework"
-requires-python = ">=3.9"
+requires-python = ">=3.10"
license-files = ["LICENSE"]
dependencies = [
"je_open_cv",
"pillow",
- "Pyside6==6.9.0",
"pyobjc-core;platform_system=='Darwin'",
"pyobjc;platform_system=='Darwin'",
"python-Xlib;platform_system=='Linux'",
"mss"
]
classifiers = [
- "Programming Language :: Python :: 3.9",
+ "Programming Language :: Python :: 3.10",
"Development Status :: 2 - Pre-Alpha",
"Environment :: Win32 (MS Windows)",
"Environment :: MacOS X",
@@ -44,4 +43,4 @@ content-type = "text/markdown"
find = { namespaces = false }
[project.optional-dependencies]
-gui = ["PySide6==6.9.0", "qt-material"]
+gui = ["PySide6==6.9.1", "qt-material"]
diff --git a/pyproject.toml b/pyproject.toml
index b749bae..989c2d3 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,12 +1,12 @@
-# Rename to build dev version
-# This is dev version
+# Rename to build stable version
+# This is stable version
[build-system]
-requires = ["setuptools"]
+requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[project]
-name = "je_auto_control_dev"
-version = "0.0.116"
+name = "je_auto_control"
+version = "0.0.170"
authors = [
{ name = "JE-Chen", email = "jechenmailman@gmail.com" },
]