MCPcopy Create free account
hub / github.com/runhey/OnmyojiAutoScript / click_share

Method click_share

tasks/WeeklyTrifles/script_task.py:32–52  ·  view source on GitHub ↗

点击分享 :param wechat: :return:

(self, wechat)

Source from the content-addressed store, hash-verified

30
31
32 def click_share(self, wechat) -> bool:
33 """
34 点击分享
35 :param wechat:
36 :return:
37 """
38 # 点击分享
39 self.ui_click(wechat, self.I_WT_QR_CODE)
40 logger.info('Click share')
41 get_timer = Timer(2)
42 get_timer.start()
43 while 1:
44 self.screenshot()
45 if self.ui_reward_appear_click():
46 logger.info('Get reward')
47 return True
48 if self.appear_then_click(self.I_WT_QR_CODE, self.C_WT_WECHAT, interval=0.8):
49 continue
50 if get_timer.reached():
51 logger.warning('Share timeout. The reward may have been obtained')
52 return False
53
54 def _share_collect(self):
55 """

Callers 2

_share_area_bossMethod · 0.95
_share_secretMethod · 0.95

Calls 7

ui_clickMethod · 0.95
startMethod · 0.95
reachedMethod · 0.95
TimerClass · 0.90
appear_then_clickMethod · 0.80
screenshotMethod · 0.45

Tested by

no test coverage detected