- 17
- 0
- 约1.54万字
- 约 11页
- 2021-11-07 发布于福建
- 举报
多线程同步操作多个窗口
RunApp notepad.exe
RunApp notepad.exe
RunApp notepad.exe
Delay 2000
Dimenv temp_Hwnd
temp_Hwnd = 0
Dim str, arr, i
str = Plugin.Window.Search( 无标题 - 记事本 )
arr = Split(str, |)
For i = 0 To UBound(arr) - 1
temp_Hwnd = Plugin.Window.FindEx(arr(i), 0, Edit, 0)
BeginThread WriteString
While temp_Hwnd 0 判断多线程已经启动完毕,继续循环下一个。
Delay 500
Wend
Next
EndScript
Function WriteString()
Dim str, Hwnd
Hwnd = temp_Hwnd
temp_Hwnd = 0
Do
str = WaitKey
If Hwnd Plugin.Window.GetKeyFocusWn
原创力文档

文档评论(0)