大家好,又见面了,我是你们的朋友全栈君。
import win32gui
hwnd_title = dict()
def get_all_hwnd(hwnd,tem):
if win32gui.IsWindow(hwnd) and win32gui.IsWindowEnabled(hwnd) and win32gui.IsWindowVisible(hwnd):
hwnd_title.update({hwnd: win32gui.GetWindowText(hwnd)})
win32gui.EnumWindows(get_all_hwnd,2)
for h, t in hwnd_title.items():
if t is not "":
print(([h], [t]))
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/154936.html原文链接:https://javaforall.cn