ok-script 0.0.26__tar.gz → 0.0.28__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.26 → ok-script-0.0.28}/PKG-INFO +1 -1
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/capture/adb/DeviceManager.py +1 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/feature/FindFeature.py +3 -3
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/App.py +2 -1
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/tasks/ConfigItemFactory.py +6 -1
- ok-script-0.0.28/ok/gui/tasks/LabelAndDropDown.py +28 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/tasks/TaskCard.py +1 -1
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/interaction/Win32Interaction.py +2 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/task/BaseTask.py +1 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/task/ExecutorOperation.py +14 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/task/TaskExecutor.py +2 -2
- {ok-script-0.0.26 → ok-script-0.0.28}/ok_script.egg-info/PKG-INFO +1 -1
- {ok-script-0.0.26 → ok-script-0.0.28}/ok_script.egg-info/SOURCES.txt +1 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/setup.py +1 -1
- {ok-script-0.0.26 → ok-script-0.0.28}/README.md +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/OK.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/capture/BaseCaptureMethod.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/capture/HwndWindow.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/capture/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/capture/adb/ADBCaptureMethod.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/capture/adb/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/capture/adb/bin/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/capture/adb/targets.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/capture/adb/vbox.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/capture/windows/WindowsGraphicsCaptureMethod.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/capture/windows/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/capture/windows/d3d11.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/capture/windows/utils.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/capture/windows/window.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/color/Color.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/color/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/config/Config.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/config/InfoDict.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/config/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/feature/Box.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/feature/Feature.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/feature/FeatureSet.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/feature/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/Communicate.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/MainWindow.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/TabTitles.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/about/AboutTab.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/about/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/common/OKIcon.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/common/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/common/config.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/common/style_sheet.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/debug/AspectRatioWidget.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/debug/DebugTab.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/debug/FrameWidget.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/debug/InfoWidget.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/debug/LoggerWidget.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/debug/Screenshot.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/debug/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/i18n/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/i18n/path.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/i18n/update.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/icon/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/icon/icon.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/overlay/OverlayWindow.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/overlay/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/qss/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/resources.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/settings/SettingTab.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/settings/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/start/SelectCaptureListView.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/start/SelectHwndWindow.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/start/StartCard.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/start/StartTab.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/start/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/tasks/ConfigLabelAndWidget.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/tasks/LabelAndDoubleSpinBox.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/tasks/LabelAndLineEdit.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/tasks/LabelAndList.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/tasks/LabelAndSpinBox.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/tasks/LabelAndSwitchButton.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/tasks/LabelAndWidget.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/tasks/ModifyListDialog.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/tasks/ModifyListItem.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/tasks/OneTimeTaskTab.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/tasks/StartButton.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/tasks/TaskOpButton.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/tasks/TooltipTableWidget.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/tasks/TriggerTaskTab.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/tasks/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/util/Alert.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/util/InitWorker.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/util/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/widget/Card.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/widget/FramelessDialog.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/widget/ListTableWidgetItem.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/widget/NumericTableWidgetItem.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/widget/StatusBar.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/widget/Tab.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/widget/TabWidget.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/widget/UpdateConfigWidgetItem.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/widget/YesNonWidgetItem.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/gui/widget/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/interaction/ADBInteraction.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/interaction/BaseInteraction.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/interaction/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/logging/Logger.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/logging/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/ocr/OCR.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/ocr/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/predict/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/predict/predict.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/rotypes/Windows/Foundation/Collections.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/rotypes/Windows/Foundation/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/rotypes/Windows/Globalization/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/rotypes/Windows/Graphics/Capture/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/rotypes/Windows/Graphics/DirectX/Direct3D11/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/rotypes/Windows/Graphics/DirectX/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/rotypes/Windows/Graphics/Imaging/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/rotypes/Windows/Graphics/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/rotypes/Windows/Media/Ocr/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/rotypes/Windows/Media/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/rotypes/Windows/Security/Cryptography/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/rotypes/Windows/Security/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/rotypes/Windows/Storage/Streams/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/rotypes/Windows/Storage/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/rotypes/Windows/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/rotypes/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/rotypes/delegate.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/rotypes/export.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/rotypes/idldsl.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/rotypes/inspectable.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/rotypes/roapi.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/rotypes/types.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/rotypes/winstring.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/save/BlackBarProcessor.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/save/PostProcessor.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/save/SaveByInterval.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/save/SaveByKeyPress.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/save/SaveMethodBase.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/save/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/scene/FeatureScene.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/scene/Scene.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/scene/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/stats/StreamStats.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/stats/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/task/OneTimeTask.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/task/TriggerTask.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/task/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/util/__init__.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/util/exit_event.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/util/json.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/util/list.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/util/path.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/util/thread.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/util/win32_process.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok/util/yaml.py +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok_script.egg-info/dependency_links.txt +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok_script.egg-info/requires.txt +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/ok_script.egg-info/top_level.txt +0 -0
- {ok-script-0.0.26 → ok-script-0.0.28}/setup.cfg +0 -0
|
@@ -209,6 +209,7 @@ class DeviceManager:
|
|
|
209
209
|
if self.capture_method is not None:
|
|
210
210
|
self.capture_method.close()
|
|
211
211
|
self.capture_method = WindowsGraphicsCaptureMethod(self.hwnd)
|
|
212
|
+
if not isinstance(self.interaction, Win32Interaction):
|
|
212
213
|
self.interaction = Win32Interaction(self.capture_method)
|
|
213
214
|
self.capture_method.hwnd_window = self.hwnd
|
|
214
215
|
else:
|
|
@@ -10,13 +10,13 @@ class FindFeature:
|
|
|
10
10
|
self.feature_set = None
|
|
11
11
|
self.executor = None
|
|
12
12
|
|
|
13
|
-
def
|
|
13
|
+
def find_feature(self, feature_name, horizontal_variance=0, vertical_variance=0, threshold=0) -> List[Box]:
|
|
14
14
|
if self.executor.frame is None:
|
|
15
15
|
return list()
|
|
16
16
|
return self.feature_set.find_feature(self.executor.frame, feature_name, horizontal_variance, vertical_variance,
|
|
17
17
|
threshold)
|
|
18
18
|
|
|
19
|
-
def
|
|
19
|
+
def find_feature_and_set(self, features, horizontal_variance=0, vertical_variance=0, threshold=0):
|
|
20
20
|
ret = True
|
|
21
21
|
if features is None:
|
|
22
22
|
raise Exception("features cannot be None")
|
|
@@ -42,7 +42,7 @@ class FindFeature:
|
|
|
42
42
|
return False
|
|
43
43
|
|
|
44
44
|
def find_one(self, feature_name, horizontal_variance=0, vertical_variance=0, threshold=0) -> Box:
|
|
45
|
-
boxes = self.
|
|
45
|
+
boxes = self.find_feature(feature_name, horizontal_variance, vertical_variance, threshold)
|
|
46
46
|
if len(boxes) > 0:
|
|
47
47
|
if len(boxes) > 1:
|
|
48
48
|
print(f"find_one:found {feature_name} too many {len(boxes)}", file=sys.stderr)
|
|
@@ -38,6 +38,7 @@ class App:
|
|
|
38
38
|
|
|
39
39
|
self.about = self.config.get('about')
|
|
40
40
|
self.title = self.config.get('gui_title')
|
|
41
|
+
self.version = self.config.get('version')
|
|
41
42
|
self.overlay = self.config.get('debug')
|
|
42
43
|
self.loading_window = None
|
|
43
44
|
self.overlay_window = None
|
|
@@ -91,7 +92,7 @@ class App:
|
|
|
91
92
|
|
|
92
93
|
def show_main_window(self):
|
|
93
94
|
self.main_window = MainWindow(self.overlay, self.about, exit_event=self.exit_event)
|
|
94
|
-
self.main_window.setWindowTitle(self.title) # Set the window title here
|
|
95
|
+
self.main_window.setWindowTitle(f'{self.title} {self.version}') # Set the window title here
|
|
95
96
|
self.main_window.setWindowIcon(self.icon)
|
|
96
97
|
if self.overlay and ok.gui.device_manager.hwnd is not None:
|
|
97
98
|
self.overlay_window = OverlayWindow(ok.gui.device_manager.hwnd)
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
from ok.gui.tasks.LabelAndDoubleSpinBox import LabelAndDoubleSpinBox
|
|
2
|
+
from ok.gui.tasks.LabelAndDropDown import LabelAndDropDown
|
|
2
3
|
from ok.gui.tasks.LabelAndLineEdit import LabelAndLineEdit
|
|
3
4
|
from ok.gui.tasks.LabelAndSpinBox import LabelAndSpinBox
|
|
4
5
|
from ok.gui.tasks.LabelAndSwitchButton import LabelAndSwitchButton
|
|
5
6
|
from ok.gui.tasks.ModifyListItem import ModifyListItem
|
|
6
7
|
|
|
7
8
|
|
|
8
|
-
def config_widget(config, config_desc, key, value):
|
|
9
|
+
def config_widget(config, config_desc, config_type, key, value):
|
|
10
|
+
the_type = config_type.get(key)
|
|
11
|
+
if the_type:
|
|
12
|
+
if the_type['type'] == 'drop_down':
|
|
13
|
+
return LabelAndDropDown(config, config_desc, the_type['options'], key)
|
|
9
14
|
if isinstance(value, bool):
|
|
10
15
|
return LabelAndSwitchButton(config, config_desc, key)
|
|
11
16
|
elif isinstance(value, list):
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
from qfluentwidgets import ComboBox
|
|
2
|
+
|
|
3
|
+
from ok.gui.tasks.ConfigLabelAndWidget import ConfigLabelAndWidget
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class LabelAndDropDown(ConfigLabelAndWidget):
|
|
7
|
+
|
|
8
|
+
def __init__(self, config, config_desc, options, key: str):
|
|
9
|
+
super().__init__(config_desc, key)
|
|
10
|
+
self.key = key
|
|
11
|
+
self.config = config
|
|
12
|
+
self.combo_box = ComboBox()
|
|
13
|
+
self.combo_box.addItems(options)
|
|
14
|
+
self.combo_box.setCurrentIndex(find_string_index(options, self.config.get(self.key)))
|
|
15
|
+
self.combo_box.setMinimumWidth(210)
|
|
16
|
+
self.combo_box.currentTextChanged.connect(self.text_changed)
|
|
17
|
+
self.add_widget(self.combo_box)
|
|
18
|
+
|
|
19
|
+
def text_changed(self, text):
|
|
20
|
+
self.config[self.key] = text
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def find_string_index(my_list, target_string):
|
|
24
|
+
try:
|
|
25
|
+
index = my_list.index(target_string)
|
|
26
|
+
return index
|
|
27
|
+
except ValueError:
|
|
28
|
+
return 0
|
|
@@ -61,7 +61,7 @@ class TaskCard(ExpandSettingCard):
|
|
|
61
61
|
self.task.disable()
|
|
62
62
|
|
|
63
63
|
def __addConfig(self, key: str, value):
|
|
64
|
-
widget = config_widget(self.task.config, self.task.config_description, key, value)
|
|
64
|
+
widget = config_widget(self.task.config, self.task.config_description, self.task.config_type, key, value)
|
|
65
65
|
self.config_widgets.append(widget)
|
|
66
66
|
self.viewLayout.addWidget(widget)
|
|
67
67
|
self._adjustViewSize()
|
|
@@ -85,6 +85,20 @@ class ExecutorOperation:
|
|
|
85
85
|
int(width * self.executor.method.width), int(height * self.executor.method.height),
|
|
86
86
|
name=name)
|
|
87
87
|
|
|
88
|
+
def height_of_screen(self, percent):
|
|
89
|
+
return int(percent * self.executor.method.height)
|
|
90
|
+
|
|
91
|
+
@property
|
|
92
|
+
def screen_width(self):
|
|
93
|
+
return self.executor.method.width
|
|
94
|
+
|
|
95
|
+
@property
|
|
96
|
+
def screen_height(self):
|
|
97
|
+
return self.executor.method.height
|
|
98
|
+
|
|
99
|
+
def width_of_screen(self, percent):
|
|
100
|
+
return int(percent * self.executor.method.width)
|
|
101
|
+
|
|
88
102
|
def click_relative(self, x, y, move_back=False):
|
|
89
103
|
self.click(int(self.width * x), int(self.height * y), move_back)
|
|
90
104
|
|
|
@@ -143,13 +143,13 @@ class TaskExecutor:
|
|
|
143
143
|
if wait_until_before_delay == 0:
|
|
144
144
|
wait_until_before_delay = self.wait_until_before_delay
|
|
145
145
|
self.reset_scene()
|
|
146
|
-
self.sleep(wait_until_before_delay)
|
|
147
146
|
start = time.time()
|
|
148
147
|
if time_out == 0:
|
|
149
148
|
time_out = self.wait_scene_timeout
|
|
150
149
|
while not self.exit_event.is_set():
|
|
151
150
|
if pre_action is not None:
|
|
152
151
|
pre_action()
|
|
152
|
+
self.sleep(wait_until_before_delay)
|
|
153
153
|
self._frame = self.next_frame()
|
|
154
154
|
if self._frame is not None:
|
|
155
155
|
result = condition()
|
|
@@ -179,7 +179,7 @@ class TaskExecutor:
|
|
|
179
179
|
cycled = False
|
|
180
180
|
for onetime_task in self.onetime_tasks:
|
|
181
181
|
if onetime_task.enabled:
|
|
182
|
-
return onetime_task,
|
|
182
|
+
return onetime_task, True
|
|
183
183
|
if len(self.trigger_tasks) > 0:
|
|
184
184
|
if self.trigger_task_index >= len(self.trigger_tasks) - 1:
|
|
185
185
|
self.trigger_task_index = -1
|
|
@@ -63,6 +63,7 @@ ok/gui/start/__init__.py
|
|
|
63
63
|
ok/gui/tasks/ConfigItemFactory.py
|
|
64
64
|
ok/gui/tasks/ConfigLabelAndWidget.py
|
|
65
65
|
ok/gui/tasks/LabelAndDoubleSpinBox.py
|
|
66
|
+
ok/gui/tasks/LabelAndDropDown.py
|
|
66
67
|
ok/gui/tasks/LabelAndLineEdit.py
|
|
67
68
|
ok/gui/tasks/LabelAndList.py
|
|
68
69
|
ok/gui/tasks/LabelAndSpinBox.py
|
|
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.26 → ok-script-0.0.28}/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
|