Skip to content

Commit c8c9f59

Browse files
committed
Fix doc problem
Fix doc problem
1 parent 7723269 commit c8c9f59

File tree

8 files changed

+27
-0
lines changed

8 files changed

+27
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
在 AutoControl 裡,Callback function 是由 Callback Executor 提供支援,
55
以下是簡易的使用 Callback Executor 的範例,
6+
67
.. code-block:: python
8+
79
from je_auto_control import callback_executor
810
# trigger_function will first to execute, but return value need to wait everything done
911
# so this test will first print("test") then print(size_function_return_value)
@@ -34,11 +36,13 @@
3436
例如 time.sleep 會變成 time_sleep
3537

3638
.. code-block:: python
39+
3740
from je_auto_control import package_manager
3841
package_manager.add_package_to_callback_executor("time")
3942
4043
如果你需要查看被更新的 event_dict 可以使用
4144

4245
.. code-block:: python
46+
4347
from je_auto_control import callback_executor
4448
print(callback_executor.event_dict)

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
( 注意! 如果修改這個範例必須極度小心。 )
1111

1212
.. code-block:: python
13+
1314
import sys
1415
1516
from je_auto_control import AutoControlMouseException

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
以下範例是定位所有圖片
1010

1111
.. code-block:: python
12+
1213
import time
1314
1415
from je_auto_control import locate_all_image
@@ -25,6 +26,7 @@
2526
以下範例是定位並點擊圖片
2627

2728
.. code-block:: python
29+
2830
import time
2931
3032
from je_auto_control import locate_and_click
@@ -40,6 +42,7 @@
4042
以下範例是定位圖片
4143

4244
.. code-block:: python
45+
4346
import time
4447
4548
from je_auto_control import locate_image_center

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* keys_table 是所有可以使用的按鍵
1010

1111
.. code-block:: python
12+
1213
from je_auto_control import keys_table, get_special_table
1314
1415
print(keys_table)
@@ -18,6 +19,7 @@
1819
以下範例是按著鍵盤的某個按鍵,並在一秒後釋放
1920

2021
.. code-block:: python
22+
2123
from time import sleep
2224
from je_auto_control import press_key, release_key
2325
@@ -28,27 +30,31 @@
2830
以下範例是按下與釋放按鍵
2931

3032
.. code-block:: python
33+
3134
from je_auto_control import type_key
3235
3336
type_key("a")
3437
3538
以下範例是檢查鍵盤 a 鍵是否按著
3639

3740
.. code-block:: python
41+
3842
from je_auto_control import check_key_is_press
3943
4044
check_key_is_press("a")
4145
4246
以下範例是按下與放開一串按鍵
4347

4448
.. code-block:: python
49+
4550
from je_auto_control import write
4651
4752
write("abcdefg")
4853
4954
以下範例是按下按鍵並相反的釋放
5055

5156
.. code-block:: python
57+
5258
import sys
5359
5460
from je_auto_control import hotkey

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Keyword 的格式是以下範例,且在 JSON 檔案裡面使用一樣格式。
77

88
.. code-block:: python
9+
910
[
1011
["function_name_in_event_dict": {"param_name": param_value}],
1112
["function_name_in_event_dict": {"param_name": param_value}],
@@ -21,6 +22,7 @@
2122
例如 time.sleep 會變成 time_sleep
2223

2324
.. code-block:: python
25+
2426
from je_auto_control import package_manager
2527
package_manager.add_package_to_executor("time")
2628
@@ -29,17 +31,20 @@
2931
如果你需要查看被更新的 event_dict 可以使用
3032

3133
.. code-block:: python
34+
3235
from je_auto_control import executor
3336
print(executor.event_dict)
3437
3538
如果我們想要執行 JSON 檔案
3639

3740
.. code-block:: python
41+
3842
from je_auto_control import execute_action, read_action_json
3943
execute_action(read_action_json(file_path))
4044
4145
如果我們想要執行資料夾裡所有 JSON 檔案
4246

4347
.. code-block:: python
48+
4449
from je_auto_control import execute_files, get_dir_files_as_list
4550
execute_files(get_dir_files_as_list(dir_path))

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@
88
* mouse_table 是所有可以使用的按鍵
99

1010
.. code-block:: python
11+
1112
from je_auto_control import mouse_table
1213
1314
print(mouse_table)
1415
1516
以下範例是按著滑鼠,一秒後釋放滑鼠
1617

1718
.. code-block:: python
19+
1820
from time import sleep
1921
2022
from je_auto_control import press_mouse, release_mouse
@@ -25,13 +27,15 @@
2527
以下範例是點擊並放開滑鼠
2628

2729
.. code-block:: python
30+
2831
from je_auto_control import click_mouse
2932
3033
click_mouse("mouse_right")
3134
3235
以下範例是檢查滑鼠位置並改變滑鼠位置
3336

3437
.. code-block:: python
38+
3539
from je_auto_control import position, set_position
3640
3741
print(position)
@@ -40,6 +44,7 @@
4044
以下範例是3秒後滑鼠會往上 scroll
4145

4246
.. code-block:: python
47+
4348
from time import sleep
4449
from je_auto_control import scroll
4550

docs/source/Zh/doc/record/record_doc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
以下是範例如何使用
88

99
.. code-block:: python
10+
1011
from time import sleep
1112
1213
from je_auto_control import execute_action

docs/source/Zh/doc/screen/screen_doc.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66
以下範例是截圖
77

88
.. code-block:: python
9+
910
from je_auto_control import screenshot
1011
1112
screenshot()
1213
1314
以下範例是取得螢幕尺寸
1415

1516
.. code-block:: python
17+
1618
from je_auto_control import size
1719
1820
print(size())

0 commit comments

Comments
 (0)