ok-script 0.0.35__tar.gz → 0.0.36__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ok-script-0.0.35 → ok-script-0.0.36}/PKG-INFO +4 -27
- ok-script-0.0.36/README.md +24 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/capture/HwndWindow.py +5 -1
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/capture/adb/DeviceManager.py +1 -1
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/start/StartCard.py +4 -4
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/task/BaseTask.py +3 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok_script.egg-info/PKG-INFO +4 -27
- {ok-script-0.0.35 → ok-script-0.0.36}/setup.py +1 -1
- ok-script-0.0.35/README.md +0 -47
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/OK.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/capture/BaseCaptureMethod.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/capture/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/capture/adb/ADBCaptureMethod.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/capture/adb/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/capture/adb/bin/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/capture/adb/targets.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/capture/adb/vbox.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/capture/windows/WindowsGraphicsCaptureMethod.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/capture/windows/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/capture/windows/d3d11.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/capture/windows/dump.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/capture/windows/utils.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/capture/windows/window.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/color/Color.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/color/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/config/Config.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/config/InfoDict.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/config/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/feature/Box.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/feature/Feature.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/feature/FeatureSet.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/feature/FindFeature.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/feature/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/App.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/Communicate.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/MainWindow.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/TabTitles.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/about/AboutTab.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/about/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/common/OKIcon.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/common/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/common/config.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/common/style_sheet.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/debug/AspectRatioWidget.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/debug/DebugTab.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/debug/FrameWidget.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/debug/InfoWidget.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/debug/LoggerWidget.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/debug/Screenshot.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/debug/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/i18n/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/i18n/path.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/i18n/update.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/icon/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/icon/icon.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/overlay/OverlayWindow.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/overlay/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/qss/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/resources.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/settings/SettingTab.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/settings/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/start/SelectCaptureListView.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/start/SelectHwndWindow.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/start/StartTab.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/start/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/tasks/ConfigItemFactory.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/tasks/ConfigLabelAndWidget.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/tasks/LabelAndDoubleSpinBox.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/tasks/LabelAndDropDown.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/tasks/LabelAndLineEdit.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/tasks/LabelAndList.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/tasks/LabelAndSpinBox.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/tasks/LabelAndSwitchButton.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/tasks/LabelAndWidget.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/tasks/ModifyListDialog.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/tasks/ModifyListItem.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/tasks/OneTimeTaskTab.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/tasks/StartButton.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/tasks/TaskCard.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/tasks/TaskOpButton.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/tasks/TooltipTableWidget.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/tasks/TriggerTaskTab.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/tasks/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/util/Alert.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/util/InitWorker.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/util/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/widget/Card.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/widget/FramelessDialog.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/widget/ListTableWidgetItem.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/widget/NumericTableWidgetItem.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/widget/StatusBar.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/widget/Tab.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/widget/TabWidget.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/widget/UpdateConfigWidgetItem.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/widget/YesNonWidgetItem.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/gui/widget/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/interaction/ADBInteraction.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/interaction/BaseInteraction.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/interaction/Win32Interaction.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/interaction/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/logging/Logger.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/logging/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/ocr/OCR.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/ocr/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/predict/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/predict/predict.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/rotypes/Windows/Foundation/Collections.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/rotypes/Windows/Foundation/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/rotypes/Windows/Globalization/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/rotypes/Windows/Graphics/Capture/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/rotypes/Windows/Graphics/DirectX/Direct3D11/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/rotypes/Windows/Graphics/DirectX/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/rotypes/Windows/Graphics/Imaging/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/rotypes/Windows/Graphics/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/rotypes/Windows/Media/Ocr/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/rotypes/Windows/Media/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/rotypes/Windows/Security/Cryptography/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/rotypes/Windows/Security/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/rotypes/Windows/Storage/Streams/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/rotypes/Windows/Storage/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/rotypes/Windows/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/rotypes/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/rotypes/delegate.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/rotypes/export.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/rotypes/idldsl.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/rotypes/inspectable.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/rotypes/roapi.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/rotypes/types.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/rotypes/winstring.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/save/BlackBarProcessor.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/save/PostProcessor.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/save/SaveByInterval.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/save/SaveByKeyPress.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/save/SaveMethodBase.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/save/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/scene/FeatureScene.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/scene/Scene.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/scene/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/stats/StreamStats.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/stats/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/task/ExecutorOperation.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/task/OneTimeTask.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/task/TaskExecutor.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/task/TriggerTask.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/task/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/util/__init__.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/util/exit_event.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/util/json.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/util/list.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/util/path.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/util/thread.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/util/win32_process.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok/util/yaml.py +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok_script.egg-info/SOURCES.txt +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok_script.egg-info/dependency_links.txt +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok_script.egg-info/requires.txt +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/ok_script.egg-info/top_level.txt +0 -0
- {ok-script-0.0.35 → ok-script-0.0.36}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ok-script
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.36
|
|
4
4
|
Summary: Automation with Computer Vision for Python
|
|
5
5
|
Home-page: https://github.com/ok-oldking/ok-script
|
|
6
6
|
Author: ok-oldking
|
|
@@ -33,37 +33,14 @@ Requires-Dist: opencv-python==4.9.0.80
|
|
|
33
33
|
5. 支持Python3.7以上版本
|
|
34
34
|
6. 学习成本低, 自定义函数少, 也可以直接使用opencv, RapidOCR等api
|
|
35
35
|
|
|
36
|
-
## Example Usage
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
[
|
|
37
|
+
## 目前有两个已完成项目:
|
|
38
|
+
基于OCR,白荆回廊自动凹技能,可以连续跑几个小时的自动脚本[https://github.com/ok-oldking/ok-baijing](https://github.com/ok-oldking/ok-baijing)
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
# Defining game scenes to handle different in-game situations through automated tasks
|
|
43
|
-
task_executor.scenes.extend([
|
|
44
|
-
WorldScene(interaction, feature_set),
|
|
45
|
-
StartScene(interaction, feature_set),
|
|
46
|
-
MonthlyCardScene(interaction, feature_set),
|
|
47
|
-
DialogCloseButtonScene(interaction, feature_set),
|
|
48
|
-
DialogChoicesScene(interaction, feature_set),
|
|
49
|
-
DialogPlayingScene(interaction, feature_set),
|
|
50
|
-
BlackDialogScene(interaction, feature_set),
|
|
51
|
-
])
|
|
40
|
+
触发式任务,原神自动拾取, 跳过剧情等[https://github.com/ok-oldking/ok-genshin](https://github.com/ok-oldking/ok-genshin)
|
|
52
41
|
|
|
53
|
-
# Adding automated tasks for gameplay, such as dialog navigation and item collection
|
|
54
|
-
task_executor.tasks.extend([
|
|
55
|
-
AutoPlayDialogTask(interaction, feature_set), # speeding up the dialogs
|
|
56
|
-
AutoChooseDialogTask(interaction, feature_set), # choose dialog options
|
|
57
|
-
AutoPickTask(interaction, feature_set), # pickup items in world scene
|
|
58
|
-
AutoLoginTask(interaction, feature_set), # auto login and claim rewards
|
|
59
|
-
])
|
|
60
|
-
```
|
|
61
42
|
|
|
62
43
|
## Scenes
|
|
63
44
|
|
|
64
45
|
## Tasks
|
|
65
46
|
|
|
66
|
-
## Project Structure
|
|
67
|
-
|
|
68
|
-
- `autoui`: Framework code.
|
|
69
|
-
- `genshin`: Example Genshin Impact automation project
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# ok-script
|
|
2
|
+
|
|
3
|
+
类似于AirScript, 使用Python
|
|
4
|
+
|
|
5
|
+
## 优势
|
|
6
|
+
|
|
7
|
+
1. 开源免费, 依赖库均为开源方案, 支持pip install任何第三方库
|
|
8
|
+
2. 代码和打包流程完全由开发者控制, 不会上传服务器, 没有安全性隐患, 不容易被侦测和识别
|
|
9
|
+
3. 一套代码即可支持Windows安卓模拟器/ADB连接的虚拟机, Windows客户端游戏, 安卓系统直接运行(开发中)
|
|
10
|
+
4. 支持GUI以及Console运行, 也可以完全自己开发GUI
|
|
11
|
+
5. 支持Python3.7以上版本
|
|
12
|
+
6. 学习成本低, 自定义函数少, 也可以直接使用opencv, RapidOCR等api
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## 目前有两个已完成项目:
|
|
16
|
+
基于OCR,白荆回廊自动凹技能,可以连续跑几个小时的自动脚本[https://github.com/ok-oldking/ok-baijing](https://github.com/ok-oldking/ok-baijing)
|
|
17
|
+
|
|
18
|
+
触发式任务,原神自动拾取, 跳过剧情等[https://github.com/ok-oldking/ok-genshin](https://github.com/ok-oldking/ok-genshin)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## Scenes
|
|
22
|
+
|
|
23
|
+
## Tasks
|
|
24
|
+
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# original https://github.com/dantmnf & https://github.com/hakaboom/winAuto
|
|
2
2
|
import ctypes
|
|
3
|
+
import os
|
|
3
4
|
import re
|
|
4
5
|
import threading
|
|
5
6
|
import time
|
|
@@ -194,7 +195,10 @@ def get_exe_name_by_hwnd(hwnd):
|
|
|
194
195
|
exe_name = ctypes.create_unicode_buffer(1024)
|
|
195
196
|
GetModuleFileNameExW(h_process, None, exe_name, 1024)
|
|
196
197
|
|
|
198
|
+
# Extract the executable name from the full path
|
|
199
|
+
exe_only_name = os.path.basename(exe_name.value)
|
|
200
|
+
|
|
197
201
|
# Close the process handle
|
|
198
202
|
CloseHandle(h_process)
|
|
199
203
|
|
|
200
|
-
return
|
|
204
|
+
return exe_only_name
|
|
@@ -54,7 +54,7 @@ class DeviceManager:
|
|
|
54
54
|
except Exception as e:
|
|
55
55
|
logger.error("adb connect error", e)
|
|
56
56
|
self._connect_all = True
|
|
57
|
-
logger.debug(f'connect_all
|
|
57
|
+
logger.debug(f'connect_all')
|
|
58
58
|
|
|
59
59
|
def get_devices(self):
|
|
60
60
|
return list(self.device_dict.values())
|
|
@@ -80,12 +80,12 @@ class StartCard(SettingCard):
|
|
|
80
80
|
if not ok.gui.executor.connected():
|
|
81
81
|
self.status_bar.setTitle(self.tr("Game Window Disconnected"))
|
|
82
82
|
self.status_bar.setState(True)
|
|
83
|
-
elif task := ok.gui.executor.current_task:
|
|
84
|
-
self.status_bar.setTitle(self.tr("Running") + ": " + task.name)
|
|
85
|
-
self.status_bar.setState(False)
|
|
86
83
|
elif active_trigger_task_count := ok.gui.executor.active_trigger_task_count():
|
|
87
84
|
self.status_bar.setTitle(
|
|
88
|
-
self.tr("Running") + ": " + str(active_trigger_task_count) + self.tr("
|
|
85
|
+
self.tr("Running") + ": " + str(active_trigger_task_count) + ' ' + self.tr("Trigger Tasks"))
|
|
86
|
+
self.status_bar.setState(False)
|
|
87
|
+
elif task := ok.gui.executor.current_task:
|
|
88
|
+
self.status_bar.setTitle(self.tr("Running") + ": " + task.name)
|
|
89
89
|
self.status_bar.setState(False)
|
|
90
90
|
else:
|
|
91
91
|
self.status_bar.setTitle(self.tr("Waiting for task to be enabled"))
|
|
@@ -93,6 +93,9 @@ class BaseTask(ExecutorOperation):
|
|
|
93
93
|
def info_set(self, key, value):
|
|
94
94
|
self.info[key] = value
|
|
95
95
|
|
|
96
|
+
def info_add(self, key, count=1):
|
|
97
|
+
self.info[key] = self.info.get(key, 0) + count
|
|
98
|
+
|
|
96
99
|
def load_config(self, folder):
|
|
97
100
|
self.config = Config(self.default_config, folder, self.__class__.__name__)
|
|
98
101
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ok-script
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.36
|
|
4
4
|
Summary: Automation with Computer Vision for Python
|
|
5
5
|
Home-page: https://github.com/ok-oldking/ok-script
|
|
6
6
|
Author: ok-oldking
|
|
@@ -33,37 +33,14 @@ Requires-Dist: opencv-python==4.9.0.80
|
|
|
33
33
|
5. 支持Python3.7以上版本
|
|
34
34
|
6. 学习成本低, 自定义函数少, 也可以直接使用opencv, RapidOCR等api
|
|
35
35
|
|
|
36
|
-
## Example Usage
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
[
|
|
37
|
+
## 目前有两个已完成项目:
|
|
38
|
+
基于OCR,白荆回廊自动凹技能,可以连续跑几个小时的自动脚本[https://github.com/ok-oldking/ok-baijing](https://github.com/ok-oldking/ok-baijing)
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
# Defining game scenes to handle different in-game situations through automated tasks
|
|
43
|
-
task_executor.scenes.extend([
|
|
44
|
-
WorldScene(interaction, feature_set),
|
|
45
|
-
StartScene(interaction, feature_set),
|
|
46
|
-
MonthlyCardScene(interaction, feature_set),
|
|
47
|
-
DialogCloseButtonScene(interaction, feature_set),
|
|
48
|
-
DialogChoicesScene(interaction, feature_set),
|
|
49
|
-
DialogPlayingScene(interaction, feature_set),
|
|
50
|
-
BlackDialogScene(interaction, feature_set),
|
|
51
|
-
])
|
|
40
|
+
触发式任务,原神自动拾取, 跳过剧情等[https://github.com/ok-oldking/ok-genshin](https://github.com/ok-oldking/ok-genshin)
|
|
52
41
|
|
|
53
|
-
# Adding automated tasks for gameplay, such as dialog navigation and item collection
|
|
54
|
-
task_executor.tasks.extend([
|
|
55
|
-
AutoPlayDialogTask(interaction, feature_set), # speeding up the dialogs
|
|
56
|
-
AutoChooseDialogTask(interaction, feature_set), # choose dialog options
|
|
57
|
-
AutoPickTask(interaction, feature_set), # pickup items in world scene
|
|
58
|
-
AutoLoginTask(interaction, feature_set), # auto login and claim rewards
|
|
59
|
-
])
|
|
60
|
-
```
|
|
61
42
|
|
|
62
43
|
## Scenes
|
|
63
44
|
|
|
64
45
|
## Tasks
|
|
65
46
|
|
|
66
|
-
## Project Structure
|
|
67
|
-
|
|
68
|
-
- `autoui`: Framework code.
|
|
69
|
-
- `genshin`: Example Genshin Impact automation project
|
ok-script-0.0.35/README.md
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# ok-script
|
|
2
|
-
|
|
3
|
-
类似于AirScript, 使用Python
|
|
4
|
-
|
|
5
|
-
## 优势
|
|
6
|
-
|
|
7
|
-
1. 开源免费, 依赖库均为开源方案, 支持pip install任何第三方库
|
|
8
|
-
2. 代码和打包流程完全由开发者控制, 不会上传服务器, 没有安全性隐患, 不容易被侦测和识别
|
|
9
|
-
3. 一套代码即可支持Windows安卓模拟器/ADB连接的虚拟机, Windows客户端游戏, 安卓系统直接运行(开发中)
|
|
10
|
-
4. 支持GUI以及Console运行, 也可以完全自己开发GUI
|
|
11
|
-
5. 支持Python3.7以上版本
|
|
12
|
-
6. 学习成本低, 自定义函数少, 也可以直接使用opencv, RapidOCR等api
|
|
13
|
-
|
|
14
|
-
## Example Usage
|
|
15
|
-
|
|
16
|
-
Basically you only need to write the Tasks and Scenes, the autoui framework will do all the heavy lifting.
|
|
17
|
-
[genshin/main.py](genshin/main.py)
|
|
18
|
-
|
|
19
|
-
```python
|
|
20
|
-
# Defining game scenes to handle different in-game situations through automated tasks
|
|
21
|
-
task_executor.scenes.extend([
|
|
22
|
-
WorldScene(interaction, feature_set),
|
|
23
|
-
StartScene(interaction, feature_set),
|
|
24
|
-
MonthlyCardScene(interaction, feature_set),
|
|
25
|
-
DialogCloseButtonScene(interaction, feature_set),
|
|
26
|
-
DialogChoicesScene(interaction, feature_set),
|
|
27
|
-
DialogPlayingScene(interaction, feature_set),
|
|
28
|
-
BlackDialogScene(interaction, feature_set),
|
|
29
|
-
])
|
|
30
|
-
|
|
31
|
-
# Adding automated tasks for gameplay, such as dialog navigation and item collection
|
|
32
|
-
task_executor.tasks.extend([
|
|
33
|
-
AutoPlayDialogTask(interaction, feature_set), # speeding up the dialogs
|
|
34
|
-
AutoChooseDialogTask(interaction, feature_set), # choose dialog options
|
|
35
|
-
AutoPickTask(interaction, feature_set), # pickup items in world scene
|
|
36
|
-
AutoLoginTask(interaction, feature_set), # auto login and claim rewards
|
|
37
|
-
])
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## Scenes
|
|
41
|
-
|
|
42
|
-
## Tasks
|
|
43
|
-
|
|
44
|
-
## Project Structure
|
|
45
|
-
|
|
46
|
-
- `autoui`: Framework code.
|
|
47
|
-
- `genshin`: Example Genshin Impact automation project
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ok-script-0.0.35 → ok-script-0.0.36}/ok/rotypes/Windows/Graphics/DirectX/Direct3D11/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|