Skip to content

Commit

Permalink
检查最低分辨率
Browse files Browse the repository at this point in the history
修复无法刷新烙痕
  • Loading branch information
ok-oldking committed Jun 10, 2024
1 parent 897ccd3 commit 562b14d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 4 additions & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,13 @@ def calculate_pc_exe_path(running_path):
<p>视频演示 <a href="https://www.bilibili.com/video/BV1K7421f7KT/">https://www.bilibili.com/video/BV1K7421f7KT/</a></p>
<p>QQ群:<a href="https://qm.qq.com/q/aGO7eBJ2Uw">594495691</a></p>
""",
'supported_resolution': {
'ratio': '16:9',
'min_size': (1280, 720)
},
'supported_screen_ratio': '16:9',
'screenshots_folder': "screenshots",
'gui_title': 'OK白荆', # Optional
# 'coco_feature_folder': get_path(__file__, 'assets/coco_feature'), # required if using feature detection
'log_file': 'logs/ok-script.log', # Optional, auto rotating every day
'error_log_file': 'logs/ok-script_error.log',
'version': version,
Expand Down
5 changes: 1 addition & 4 deletions task/AoSkillManXunTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def __init__(self):
self.config_description["支援烙痕类型"] = '一定要匹配, 否则刷不到'
self.config_type["支援烙痕类型"] = {'type': "drop_down", 'options': self.stats_seq}
self.pause_combat_message = "成功刷到目标技能, 暂停"
self.refresh_laohen_button = None

@override
def run(self):
Expand Down Expand Up @@ -139,8 +138,6 @@ def choose_assist_laohen(self):
zhiyuan = boxes[0]
self.click_box(zhiyuan, relative_y=-0.5)
self.sleep(2)
if not self.refresh_laohen_button:
self.refresh_laohen_button = self.ocr(box=self.top_right_button_zone, match="刷新列表")
assist_laohen_type = self.config.get("支援烙痕类型")
laohen_type_index = find_index(assist_laohen_type, self.stats_seq)
gap = self.height_of_screen((1564 - 1209) / 4 / 1080)
Expand All @@ -151,7 +148,7 @@ def choose_assist_laohen(self):
assist = self.wait_until(self.choose_assist_laohen_check,
time_out=300,
wait_until_before_delay=3,
post_action=lambda: self.click_box(self.refresh_laohen_button))
post_action=lambda: self.click_relative(0.91, 0.07))
self.click_box(assist)
self.sleep(2)
select = self.ocr(box=self.box_of_screen(0.5, 0.5, width=0.5, height=0.5, name="支援记忆烙痕检测区域"),
Expand Down

0 comments on commit 562b14d

Please sign in to comment.