Created
May 21, 2020 05:14
-
-
Save tokibito/a51cdac2fc9d7391e1242ede2661f4d9 to your computer and use it in GitHub Desktop.
get active window title
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import win32gui | |
import time | |
while True: | |
handle = win32gui.GetForegroundWindow() | |
title = win32gui.GetWindowText(handle) | |
print(handle, title) | |
time.sleep(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment