|
@@ -382,6 +382,26 @@ def operate_cash(confirm=False):
|
|
gui.press('enter')
|
|
gui.press('enter')
|
|
mv_mouse_cent()
|
|
mv_mouse_cent()
|
|
|
|
|
|
|
|
+def show_unread(confirm=False):
|
|
|
|
+ ciel_win = 'Mozilla Thunderbird'
|
|
|
|
+ # active_win = gw.getActiveWindowTitle()
|
|
|
|
+ # ciel_win = gw.getWindowsWithTitle(CIEL, condition=gw.Re.CONTAINS)[0]
|
|
|
|
+ active_win = gw.getActiveWindowTitle()
|
|
|
|
+ if ciel_win in active_win:
|
|
|
|
+ # ciel_win.activate()
|
|
|
|
+ butt_x_y = gui.locateCenterOnScreen(f'ciel_imgs/{_CIEL}unread.png', confidence=CONF)
|
|
|
|
+ sleep(0.1)
|
|
|
|
+ if butt_x_y:
|
|
|
|
+ gui.click(butt_x_y[0], butt_x_y[1])
|
|
|
|
+ if confirm:
|
|
|
|
+ while gui.locateCenterOnScreen(f'ciel_imgs/{_CIEL}confirm_2.png', confidence=CONF) is None:
|
|
|
|
+ gui.locateCenterOnScreen(f'ciel_imgs/{_CIEL}confirm_2.png', confidence=CONF)
|
|
|
|
+ if gui.locateCenterOnScreen(f'ciel_imgs/{_CIEL}confirm_2.png', confidence=CONF):
|
|
|
|
+ break
|
|
|
|
+ sleep(0.25)
|
|
|
|
+ gui.press('enter')
|
|
|
|
+ mv_mouse_cent()
|
|
|
|
+
|
|
def main():
|
|
def main():
|
|
kb.register_hotkey('control+e', callback=devalidate_doc, args=())
|
|
kb.register_hotkey('control+e', callback=devalidate_doc, args=())
|
|
kb.register_hotkey('control+w', callback=validate_doc, args=())
|
|
kb.register_hotkey('control+w', callback=validate_doc, args=())
|