Ejemplo n.º 1
0
def FindWindow(title, class_name, parent=0, child_after=0):
    """Finds a window of a given title and class.

  Args:
    title: Title of the window to search.
    class_name: Class name of the window to search.
    parent: Handle to the parent window whose child windows are to be searched.
    child_after: HWND to a child window. Search begins with the next child
      window in the Z order.

  Returns:
    Handle of the found window, or 0 if not found.
  """
    hwnd = 0
    try:
        hwnd = win32gui.FindWindowEx(int(parent), int(child_after), class_name,
                                     title)
    except win32gui.error as err:
        if err[0] == winrror.ERROR_INVALID_WINDOW_HANDLE:  # Could be closed.
            pass
        elif err[0] != winrror.ERROR_FILE_NOT_FOUND:
            raise err
    if hwnd:
        win32gui.FlashWindow(hwnd, True)
    return hwnd
Ejemplo n.º 2
0
def FlashMyWindow2(title2):
    ID2 = win32gui.FindWindow(None, title2)
    win32gui.FlashWindow(ID2,True)    
Ejemplo n.º 3
0
def FlashMyWindow(title):
    ID = win32gui.FindWindow(None, title)
    win32gui.FlashWindow(ID,True)
Ejemplo n.º 4
0
def SohbetPencere(baslik):
    ID = win32gui.FindWindow(None, baslik)
    win32gui.FlashWindow(ID, True)
Ejemplo n.º 5
0
 def drawRect(self, x, y, w, h):
     win32gui.FlashWindow(self.hwnd, 0)
     self.prebrush = win32gui.SelectObject(self.hwndDC, self.hbrush)
     win32gui.Rectangle(self.hwndDC, x - 1, y - 1, x + w + 2, y + h + 2)  # 左上到右下的坐标
Ejemplo n.º 6
0
def buy():
    win32gui.FlashWindow(win32gui.GetForegroundWindow(), 0)
    print("! found")
Ejemplo n.º 7
0
 def flashTitlebar(self, flag):        
     id = win32gui.FindWindow(None, self.title)
     win32gui.FlashWindow(id, flag)
Ejemplo n.º 8
0
def FlashMyWindow(title):
    ID = win32gui.FindWindow(None, title)
    for i in range(0, 5):
        sleep(1)
        win32gui.FlashWindow(ID, True)