全屏显示时不显示通知弹出窗口

2024-09-28 23:36:27 发布

您现在位置:Python中文网/ 问答频道 /正文

当前当我的程序运行并且满足弹出窗口的所有条件时,弹出窗口将工作,但是当我在游戏或视频的全屏中时,通知将不会弹出

我尝试使用win10toast,但它导致我的通知没有弹出

                          if int(StraincounterValue) > 0 and q%int(StraincounterValue) == 0:
                              notification.notify(
                                      title='Eyes Straining Warning!',
                                      message='You started work at 0800hr today. Have detected that you strain your eyes ( without blinking for 5 seconds ) %(q)d times today. Please relax your eyes'% {"q": q},
                                      app_icon=None,  # e.g. 'C:\\icon_32x32.icon'
                                      timeout=10,  # seconds
                                                 )
                              break

Tags: and程序运行游戏yourtoday视频if条件