获取QQ发送窗口句柄之文本例程

易语言 2020-08-22 17:45:31

获取QQ发送窗口句柄之文本例程

编辑框1.内容 = “”
aa = 取空白文本 (255)
hWnd = FindWindowExA (0, 0, “#32770”, 0)
.判断循环首 (hWnd ≠ 0)
GetWindowTextA (hWnd, aa, 255)
.如果 (取文本右边 (aa, 6) = “聊天中”)
跳出循环 ()
.否则

.如果结束
hWnd = FindWindowExA (0, hWnd, “#32770”, 0)
.判断循环尾 ()
句柄 = FindWindowExA (hWnd, 0, “#32770”, 0)
句柄 = FindWindowExA (句柄, 0, “RichEdit20A”, 0)
编辑框2.内容 = 到文本 (句柄)
置剪辑板文本 (“”)
SendMessageA (句柄, 177, 0, -1)
SendMessageA (句柄, 769, 0, 0)
SendMessageA (句柄, 177, 0, 0)
SendMessageA (编辑框1.取窗口句柄 (), 770, 0, 0)