python winapi demo
来源:互联网 发布:学java需要多长时间 编辑:程序博客网 时间:2024/05/17 08:15
import win32guiMAIN_HWND = 0def is_win_ok(hwnd, starttext): s = win32gui.GetWindowText(hwnd) if s.startswith(starttext): print s global MAIN_HWND MAIN_HWND = hwnd return None return 1def find_main_window(starttxt): global MAIN_HWND win32gui.EnumChildWindows(0, is_win_ok, starttxt) return MAIN_HWNDdef winfun(hwnd, lparam): s = win32gui.GetWindowText(hwnd) if len(s) > 3: print("winfun, child_hwnd: %d txt: %s" % (hwnd, s)) return 1def main(): main_app = 'EditPlus' hwnd = win32gui.FindWindow(None, main_app) print hwnd if hwnd < 1: hwnd = find_main_window(main_app) print hwnd if hwnd: win32gui.EnumChildWindows(hwnd, winfun, None)main()
0 0
- python winapi demo
- the Demo of Beep function of WinAPI
- WINAPI
- WINAPI
- WINAPI
- WINAPI
- WINAPI
- WINAPI
- WinAPI
- python demo
- Python demo
- Python Demo
- Python Template Demo
- Python lib demo
- CentOS thrift python demo
- python文件读写demo
- Python抓取图片Demo
- python下载文件DEMO
- UI初级连载八------------标签控制器
- RKAndroidTool工具的各项image详解(RK2918版本)
- Ubuntu 14.04 下 MongoDB 服务器 和 PHP MongoDB Driver 安装
- Android-Activity的四状态、七生命周期、和四启动模式
- 【Java笔记】——有趣的递归算法
- python winapi demo
- iOS 创建单例的两种方法
- struts2配置文件加载机制
- 队列之顺序队列
- HDU 1058.Humble Numbers【这个题怎么定位呢···就【DP】吧】【8月28】
- android移动开发环境搭建与配置
- ios真机调试
- self和super的底层原理
- 移动终端app测试点归纳