googleitup.py 文件源码

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

项目:InstaGoogling 作者: Ivanca 项目源码 文件源码
def run(self):
        if isWindows:
            global windowsWindow
            global isOnTop
            wasOnTop = False
            while True:
                if windowsWindow:
                    focused = False
                    fg = win32gui.GetForegroundWindow()
                    if windowsWindow == fg:
                        focused = True
                    else:
                        for win in sublime.windows():
                            if win.hwnd() == fg:
                                focused = True
                    # print("focused....")
                    # print(focused)

                    if focused == False:
                        if isOnTop != False:
                            wasOnTop = True
                            set_always_on_top(False)
                            # print("moving to bottom")

                    if focused == True:
                        if isOnTop != True:
                            if wasOnTop == True:
                                wasOnTop = False
                                try:
                                    win32gui.SetFocus(windowsWindow)
                                except Exception as e:
                                    pass
                                time.sleep(0.1)
                                set_always_on_top(True)
                                # print("moving to top")
                    time.sleep(0.2)
                else:
                    time.sleep(3)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号