My win32gui (Python)

Summary for myself Updated from time to time

** I just need to know myself, so the terms may be wrong in some places **

!! View

#command
    #Argument option description

What is win32gui used for?

I wonder if I often use it when getting windows


Module loading

import win32gui

Frequent operation

#Get window handle by window title
win32gui.FindWindow()
    #The first argument is the class name, otherwise None
    #The second argument is the title name

#Get the window handle of the foreground window
win32gui.GetForegroundWindow()

#Get the position of the window
rect = win32gui.GetWindowRect()
    #Argument window handle
  #The return value is
  #rect[0]Top left of screen x coordinate
  #rect[1]Upper left y coordinate of the screen
  #rect[2]Bottom right of screen x coordinate
  #rect[3]Bottom right of screen y coordinate

Recommended Posts

My win32gui (Python)
My Numpy (Python)
My sys (python)
My pyproj (python)
My pandas (python)
My str (python)
My pyautogui (python)
My PySide (Python)
My shutil (python)
My matplotlib (python)
My urllib (python)
My pyperclip (python)
My sklearn (python)
[My memo] python
My ConfigParser (Python)
My Webdriver (Python)
My arcpy (python)
My os (python)
My python environment memo
My Beautiful Soup (Python)
[My memo] python -v / python -V
Python Tips (my memo)
My python data analysis container
Python
I made my own Python library
[Python] My stock price forecast [HFT]
My favorite boto3 (Python) API sample
Python My Number verification module released
kafka python
Python Summary
Built-in python
Python comprehension
Python technique
Studying python
Python 2.7 Countdown
Python FlowFishMaster
Python service
python tips
python function ①
Python basics
Python memo
ufo-> python (3)
Python comprehension
install python
Python basics ④
Python Memorandum 2
python memo
Python Jinja2
Python increment
atCoder 173 Python
[Python] function
Python installation
python tips
Installing Python 3.4.3.
Python memo
Python iterative
Python algorithm
Python2 + word2vec
[Python] Variables
Python functions
Python sys.intern ()