学习python win32gui中有个小问题如何向其他程序发送消息
```python
import win32gui
import win32con
import win32api
import time
ret = win32api.ShellExecute(1, 'open', 'D:\软件\云展网下载\云展网→PDF_UI_20220814', '', '', 1)
time.sleep(2)
handle = win32gui.FindWindow(None,'云展网书籍下载器')
time.sleep(2)
win32gui.SetForegroundWindow(handle)
a= win32gui.GetWindowRect(handle)# 获取窗口位置(left, top, right, bottom)
print(a)
print(a[0])
print(a[1])
hwndChildList = []
win32gui.EnumChildWindows(handle, lambda hwnd, param: param.append(hwnd), hwndChildList)# EnumChildWindows 为指定的父窗口枚举子窗口
print(hwndChildList)
for b in hwndChildList:
print(b)
print("%x" %(b) )
time.sleep(2)
win32gui.SendMessage(b, win32con.WM_SETTEXT, None, 'hello')
win32gui.SetForegroundWindow(hwndChildList[2])
tid = win32gui.FindWindowEx(handle, None, 'TkChild', None)
win32gui.SetForegroundWindow(hwndChildList[6])
![img](https://img-mid.csdnimg.cn/release/static/image/mid/ask/480157965486111.png "#left")
研究好几天,没研究明白,请大神指点一二,这里小白不胜感激