mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-22 05:53:44 +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
|
return False
|
||||||
|
|
||||||
if self.appear(USE_DATA_KEY, offset=(20, 20)):
|
if self.appear(USE_DATA_KEY, offset=(20, 20)):
|
||||||
self.device.click(USE_DATA_KEY_NOTIFIED)
|
skip_first_screenshot = True
|
||||||
self.device.sleep((0.5, 0.8))
|
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 self.handle_popup_confirm('USE_DATA_KEY')
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|||||||
Reference in New Issue
Block a user