python 通过标题获取窗口大小
发布日期:2021-06-24 15:28:39 浏览次数:2 分类:技术文章

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

# -*- coding: utf-8 -*-"""Created on Mon Jun 17 22:55:33 2019QQ群:476842922(欢迎加群讨论学习)@author: Administrator"""import win32guiimport win32apiclassname = "MozillaWindowClass"titlename = "aaaaa.txt - 记事本"#获取句柄hwnd = win32gui.FindWindow(0, titlename)#获取窗口左上角和右下角坐标left, top, right, bottom = win32gui.GetWindowRect(hwnd)print(left)

在这里插入图片描述

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

上一篇:python pyaudio录音机
下一篇:python3 遍历 所有句柄及窗口名称

发表评论

最新留言

网站不错 人气很旺了 加油
[***.192.178.218]2024年04月16日 10时34分30秒