python3 遍历 所有句柄及窗口名称
发布日期:2021-06-24 15:28:39 浏览次数:2 分类:技术文章

本文共 423 字,大约阅读时间需要 1 分钟。

# -*- coding: utf-8 -*-"""Created on Mon Jun 17 22:55:29 2019@author: Administrator""" import win32guihwnd_title = dict()def get_all_hwnd(hwnd,mouse):    if win32gui.IsWindow(hwnd) and win32gui.IsWindowEnabled(hwnd) and win32gui.IsWindowVisible(hwnd):        hwnd_title.update({
hwnd:win32gui.GetWindowText(hwnd)})win32gui.EnumWindows(get_all_hwnd, 0) for h,t in hwnd_title.items(): if t is not "": print(h, t)

在这里插入图片描述

转载地址:https://blog.csdn.net/weixin_33595571/article/details/92741039 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:python 通过标题获取窗口大小
下一篇:python读写excel文件

发表评论

最新留言

很好
[***.229.124.182]2024年04月05日 03时38分26秒

关于作者

    喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!

推荐文章