mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 02:48:23 +08:00
Upd: validate and re-try mechanism for notified check box
This commit is contained in:
@@ -143,8 +143,22 @@ class InfoHandler(ModuleBase):
|
||||
return False
|
||||
|
||||
if self.appear(USE_DATA_KEY, offset=(20, 20)):
|
||||
self.device.click(USE_DATA_KEY_NOTIFIED)
|
||||
self.device.sleep((0.5, 0.8))
|
||||
skip_first_screenshot = True
|
||||
while 1:
|
||||
if skip_first_screenshot:
|
||||
skip_first_screenshot = False
|
||||
else:
|
||||
self.device.screenshot()
|
||||
|
||||
enabled = self.image_color_count(USE_DATA_KEY_NOTIFIED,
|
||||
color=(140, 207, 66), threshold=180, count=10)
|
||||
if enabled:
|
||||
break
|
||||
|
||||
if self.appear(USE_DATA_KEY, offset=(20, 20), interval=5):
|
||||
self.device.click(USE_DATA_KEY_NOTIFIED)
|
||||
continue
|
||||
|
||||
return self.handle_popup_confirm('USE_DATA_KEY')
|
||||
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user