1
0
mirror of https://github.com/TheFunny/ArisuAutoSweeper synced 2025-12-16 19:55:12 +00:00

feat: add function for button click with interval

This commit is contained in:
YoursFunny 2023-11-03 21:42:22 +08:00
parent 96b5f1db85
commit 75e6417620
Signed by: YoursFunny
GPG Key ID: 207EDC3CD5B40F9C

View File

@ -128,6 +128,14 @@ class ModuleBase:
self.device.click(button) self.device.click(button)
return appear return appear
def click_with_interval(self, button, interval=5):
if interval and not self.interval_is_reached(button, interval=interval):
return False
self.device.click(button)
if interval:
self.interval_reset(button, interval=interval)
return True
def wait_until_stable(self, button, timer=Timer(0.3, count=1), timeout=Timer(5, count=10)): def wait_until_stable(self, button, timer=Timer(0.3, count=1), timeout=Timer(5, count=10)):
""" """
A terrible method, don't rely too much on it. A terrible method, don't rely too much on it.