win32_counter.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:KeyCounter 作者: Microcore 项目源码 文件源码
def start(self):
        if self.instance_running():
            try:
                self.stop()
            except SystemExit:
                return win32gui.PostQuitMessage(0)

        # Load today's count data back from data file
        super(KeyCounter, self).start()

        self.hook_keyboard()
        self.create_window()
        self.update_tray_icon()

        while 1:
            try:
                win32event.MsgWaitForMultipleObjects(
                    [],
                    0,
                    self.MSPF,
                    win32event.QS_ALLEVENTS
                )
                win32gui.PumpWaitingMessages()
            except SystemExit:
                win32gui.PostQuitMessage(0)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号