Skip to content

Commit 875af15

Browse files
committed
Update stable version
Update stable version
1 parent 6de2984 commit 875af15

File tree

18 files changed

+110
-96
lines changed

18 files changed

+110
-96
lines changed

stable.toml renamed to dev.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Rename to build stable version
2-
# This is stable version
1+
# Rename to build dev version
2+
# This is dev version
33
[build-system]
4-
requires = ["setuptools>=61.0"]
4+
requires = ["setuptools"]
55
build-backend = "setuptools.build_meta"
66

77
[project]
8-
name = "je_auto_control"
9-
version = "0.0.127"
8+
name = "je_auto_control_dev"
9+
version = "0.0.63"
1010
authors = [
1111
{ name = "JE-Chen", email = "zenmailman@gmail.com" },
1212
]

docs/source/Eng/doc/callback_function/callback_function_doc.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ for example, time.sleep will become time_sleep.
4141

4242
If we want to add functions in the callback_executor, we can use the following code:
4343

44+
This code will add all the functions of the time module to the executor (interpreter).
45+
4446
.. code-block:: python
4547
4648
from je_auto_control import package_manager

docs/source/Eng/doc/cli/cli_doc.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
命令列介面 文件
1+
CLI
22
----
33

4-
我們可以使用 CLI 模式去執行 keyword.json 檔案或執行包含 Keyword.json files 的資料夾,
5-
以下這個範例是去執行指定路徑的關鍵字 json 檔
4+
We can use the CLI mode to execute the keyword.
5+
json file or execute the folder containing the Keyword.json files.
6+
7+
The following example is to execute the specified path of the keyword JSON file.
68

79
.. code-block::
810
911
python je_auto_control --execute_file "C:\Users\JeffreyChen\Desktop\Code_Space\AutoControl\test\unit_test\argparse\test1.json"
1012
1113
1214
13-
以下這個範例是去執行指定路徑資料夾下所有的 keyword json 檔
15+
The following example is to run all keyword JSON files in a specified folder:
1416

1517
.. code-block::
1618

docs/source/Eng/doc/critical_exit/critical_exit_doc.rst

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
緊急退出 文件
1+
緊急退出
22
----
3-
* Critical Exit 是提供故障保護的機制。
4-
* Critical Exit 預設是關閉的。
5-
* 如果開啟,預設按鍵是 F7。
6-
* 開啟的方法是 CriticalExit().init_critical_exit()
73

8-
以下這個範例是讓滑鼠不受控制的移動並拋出例外,
9-
當接收到例外,初始化 Critical Exit 並自動按下 F7,
10-
( 注意! 如果修改這個範例必須極度小心。 )
4+
* Critical Exit is a mechanism that provides fault protection.
5+
* Critical Exit is disabled by default.
6+
* If enabled, the default hotkey is F7.
7+
* To enable Critical Exit, call CriticalExit().init_critical_exit()
8+
* (enabling it will consume additional system resources).
9+
10+
The following example is to make the mouse move uncontrollably and throw an exception.
11+
When the exception is caught, initialize the Critical Exit and automatically press F7.
12+
(Note! If you modify this example, you must be extremely careful.
13+
You may lose control of your computer, such as the mouse being out of control.)
1114

1215
.. code-block:: python
1316
@@ -16,7 +19,7 @@
1619
from je_auto_control import AutoControlMouseException
1720
from je_auto_control import CriticalExit
1821
from je_auto_control import press_key
19-
from je_auto_control import set_mouse_position
22+
from je_auto_control import set_position
2023
from je_auto_control import size
2124
2225
# print your screen width and height
@@ -27,7 +30,7 @@
2730
2831
try:
2932
from time import sleep
30-
33+
# Or no sleep
3134
sleep(3)
3235
while True:
3336
set_mouse_position(200, 400)

docs/source/Eng/doc/generate_report/generate_report_doc.rst

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
報告產生 文件
1+
Generate Report
22
----
33

4-
Generate Report 可以生成以下格式的報告
5-
* HTML
6-
* JSON
7-
* XML
8-
* Generate Report 主要用來記錄與確認有哪些步驟執行,執行是否成功,
9-
* 如果要使用 Generate Report 需要先設定紀錄為 True,使用 test_record_instance.init_record = True
10-
* 下面的範例有搭配 keyword and executor 如果看不懂可以先去看看 executor
11-
以下是產生 HTML 的範例。
4+
* Generate Report can generate reports in the following formats:
5+
* HTML
6+
* JSON
7+
* XML
8+
9+
* Generate Report is mainly used to record and confirm which steps were executed and whether they were successful or not.
10+
* If you want to use Generate Report, you need to set the recording to True by using test_record_instance.init_record = True.
11+
* The following example is used with keywords and an executor. If you don't understand, please first take a look at the executor.
12+
13+
Here's an example of generating an HTML report.
1214

1315
.. code-block:: python
1416
@@ -57,7 +59,7 @@ Generate Report 可以生成以下格式的報告
5759
execute_action(test_list)
5860
5961
60-
以下是產生 JSON 的範例。
62+
Here's an example of generating an JSON report.
6163

6264
.. code-block:: python
6365
@@ -105,7 +107,7 @@ Generate Report 可以生成以下格式的報告
105107
print("\n\n")
106108
execute_action(test_list)
107109
108-
以下是產生 XML 的範例。
110+
Here's an example of generating an XML report.
109111

110112
.. code-block:: python
111113

docs/source/Eng/doc/image/image_doc.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
圖片偵測 文件
1+
Image detect
22
----
33

4-
* Image 提供了關於圖像辨識的功能。
5-
* 定位一張圖片在螢幕中的位置。
6-
* 定位多張圖片在螢幕中的位置。
7-
* 定位圖片在螢幕中的位置並點擊。
4+
* Image detect provides functionalities related to image recognition.
5+
* Locating the position of a single image on the screen.
6+
* Locating the position of multiple images on the screen.
7+
* Locating the position of an image on the screen and clicking on it.
88

9-
以下範例是定位所有圖片
9+
This is mainly used to recognize images on the screen and perform clicks or determine if the image exists on the screen.
10+
11+
The following example is to locate all images.
1012

1113
.. code-block:: python
1214
@@ -23,7 +25,7 @@
2325
image_data = locate_all_image(screenshot(), detect_threshold=0.9, draw_image=False)
2426
print(image_data)
2527
26-
以下範例是定位並點擊圖片
28+
The following example is used to locate and click on an image.
2729

2830
.. code-block:: python
2931
@@ -39,7 +41,7 @@
3941
image_data = locate_and_click(screenshot(), "mouse_left", detect_threshold=0.9, draw_image=False)
4042
print(image_data)
4143
42-
以下範例是定位圖片
44+
The following example locates an image.
4345

4446
.. code-block:: python
4547

docs/source/Eng/doc/installation/installation_doc.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
安裝 文件
1+
Installation
22
----
33

44
.. code-block:: python
@@ -14,7 +14,7 @@
1414
* osx 11 big sur
1515
* ubuntu 20.0.4
1616

17-
| 如果想要在樹梅派使用
17+
| If you want install on raspberry pi
1818
1919
.. code-block:: python
2020

docs/source/Eng/doc/keyboard/keyboard_doc.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
鍵盤 文件
1+
Keyboard
22
----
33

4-
* 主要用來模擬鍵盤的控制。
5-
* 提供熱鍵、檢盤鍵盤狀態、模擬鍵盤控制等功能。
4+
* Used to simulate keyboard control.
5+
* Provides functions such as hotkeys, checking keyboard key status (whether pressed), and simulating keyboard control.
6+
* The following example is to obtain information about the keyboard.
67

7-
以下範例是取得鍵盤的資訊,
8-
* special_table 是特定的鍵盤按鍵 ( 注意! 不是每個平台都有 )
9-
* keys_table 是所有可以使用的按鍵
8+
* special_table is a table of special keyboard keys (Note! Not every platform has them).
9+
* keys_table is a table of all available keys.
1010

1111
.. code-block:: python
1212
@@ -16,7 +16,7 @@
1616
print(get_special_table())
1717
1818
19-
以下範例是按著鍵盤的某個按鍵,並在一秒後釋放
19+
The following example presses a certain key on the keyboard and releases it after one second.
2020

2121
.. code-block:: python
2222
@@ -27,7 +27,7 @@
2727
sleep(1)
2828
release_key("a")
2929
30-
以下範例是按下與釋放按鍵
30+
The following example presses and releases a key.
3131

3232
.. code-block:: python
3333
@@ -51,7 +51,7 @@
5151
5252
write("abcdefg")
5353
54-
以下範例是按下按鍵並相反的釋放
54+
以下範例是按下按鍵並相反的釋放按鍵
5555

5656
.. code-block:: python
5757

docs/source/Eng/doc/keyword_and_executor/keyword_and_executor_doc.rst

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
鍵盤與執行者 文件
1+
Keyword & Executor
22
----
33

4-
* Keyword 是一個 JSON 檔案裏面包含許多自定義的關鍵字與參數。
5-
* Keyword 會與 Executor 搭配使用。
6-
* Keyword 的格式是以下範例,且在 JSON 檔案裡面使用一樣格式。
4+
Keyword is a JSON file that contains many custom keywords and parameters.
5+
Keywords are used in conjunction with the Executor.
6+
The format of a keyword is as shown in the following example, and the same format is used in the JSON file.
77

88
.. code-block:: python
99
@@ -16,10 +16,13 @@
1616
["function_name_in_event_dict": {param_value1, param_value2....}]
1717
]
1818
19-
如果我們想要在 executor 裡面添加 function,可以使用如下:
20-
這段程式碼會把所有 time module 的 builtin, function, method, class
21-
載入到 executor,然後要使用被載入的 function 需要使用 package_function 名稱,
22-
例如 time.sleep 會變成 time_sleep
19+
The executor is an interpreter that can parse JSON files and execute automation scripts.
20+
It can be easily transferred over the network to a remote server or computer,
21+
which can then execute the automation scripts using the executor.
22+
23+
If we want to add a function to the executor, we can use the following code snippet.
24+
This code will load all the built-in functions, methods, and classes of the time module into the executor.
25+
To use the loaded functions, we need to use the package_function name, for example, time.sleep will become time_sleep.
2326

2427
.. code-block:: python
2528
@@ -28,21 +31,21 @@
2831
2932
3033
31-
如果你需要查看被更新的 event_dict 可以使用
34+
If you need to check the updated event_dict, you can use:
3235

3336
.. code-block:: python
3437
3538
from je_auto_control import executor
3639
print(executor.event_dict)
3740
38-
如果我們想要執行 JSON 檔案
41+
If we want to execute a JSON file
3942

4043
.. code-block:: python
4144
4245
from je_auto_control import execute_action, read_action_json
4346
execute_action(read_action_json(file_path))
4447
45-
如果我們想要執行資料夾裡所有 JSON 檔案
48+
If we want to execute all JSON files in a folder, we can use the following code snippet:
4649

4750
.. code-block:: python
4851

docs/source/Eng/doc/mouse/mouse_doc.rst

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
滑鼠 文件
1+
Mouse
22
----
33

4-
* 主要用來模擬滑鼠的控制。
5-
* 提供模擬點擊、設定位置等功能。
4+
* This module is used for simulating mouse control.
5+
* It provides functions for simulating clicks, setting positions, etc.
66

7-
以下範例是取得鍵盤的資訊,
8-
* mouse_table 是所有可以使用的按鍵
7+
The following example is to obtain information about mouse clicks:
8+
mouse_table contains all the available mouse buttons.
99

1010
.. code-block:: python
1111
1212
from je_auto_control import mouse_table
1313
1414
print(mouse_table)
1515
16-
以下範例是按著滑鼠,一秒後釋放滑鼠
16+
The following example is holding down the mouse button and releasing it after one second.
1717

1818
.. code-block:: python
1919
@@ -22,17 +22,18 @@
2222
from je_auto_control import press_mouse, release_mouse
2323
2424
press_mouse("mouse_right")
25+
sleep(1)
2526
release_mouse("mouse_right")
2627
27-
以下範例是點擊並放開滑鼠
28+
The following example is clicking and releasing the mouse.
2829

2930
.. code-block:: python
3031
3132
from je_auto_control import click_mouse
3233
3334
click_mouse("mouse_right")
3435
35-
以下範例是檢查滑鼠位置並改變滑鼠位置
36+
The following example is to check the mouse position and change the mouse position.
3637

3738
.. code-block:: python
3839
@@ -41,7 +42,7 @@
4142
print(get_mouse_position())
4243
set_mouse_position(100, 100)
4344
44-
以下範例是3秒後滑鼠會往上 scroll
45+
Here's an example where the mouse will scroll up after 3 seconds:
4546

4647
.. code-block:: python
4748

0 commit comments

Comments
 (0)