ソースを参照

scroll once if no button found

Richard Köhl 1 年間 前
コミット
07ec41b7a0
1 ファイル変更5 行追加0 行削除
  1. 5 0
      screenshot.py

+ 5 - 0
screenshot.py

@@ -19,6 +19,7 @@ end_of_log = cv2.imread('templates/end_of_log.jpg')
 
 # cursor positions
 fight_scroll_top = "2494 626"
+fight_scroll_bottom = "2200 1520"
 titan_fight = "1400 860"
 damage_taken = "450 850"
 close_details = "2175 450"
@@ -189,6 +190,10 @@ def take_fight_screenshots():
 def process_war_log():
   buttons = find_templates(fight_button)
 
+  if len(buttons) == 0:
+    swipe(fight_scroll_bottom, fight_scroll_top)
+    return
+
   # process all found buttons
   for pair in buttons:
       tap(f"{pair[0]} {pair[1]}")