我用多線程的內建說明
加入滑鼠拖移
可是只有第一個視窗能有滑鼠拖移的動作
其他的兩個視窗並沒有
請問要怎麼做到 多視窗後台滑鼠拖移
===========================================
MessageBox "多線程命令還在測試當中,並不穩定,請謹慎使用!"
Dimenv Hwnd1
RunApp "notepad.exe"
RunApp "notepad.exe"
RunApp "notepad.exe"
Do
Delay 300
Hwnd = Plugin.Window.Search("未命名 - 記事本")
MyArray = Split(Hwnd, "|")
If UBound(MyArray) >= 0 Then
For i = 0 To UBound(MyArray) - 1
hwndEx = Clng(MyArray(i))
Call Plugin.Window.Move(hwndEx, i * 200 + 100, i * 200 + 50)
Call Plugin.Window.Active(hwndEx)
Hwnd1 = Plugin.Window.FindEx(hwndEx, 0, "Edit", 0)
BeginThread 打字
Delay 100
Next
Exit Do
End If
Loop
Do
Delay 500
Loop
Sub 打字()
Hwnd2=Hwnd1
For i = 0 To 9
For 30
Call Plugin.Bkgnd.SendString(Hwnd2, i)
Delay 5
Next
Call Plugin.Bkgnd.KeyPress(Hwnd2, 13)
Delay 200
Next
Call Plugin.Bkgnd.LeftDown(Hwnd2, 10, 10)
Delay 30
Call Plugin.Bkgnd.MoveTo(Hwnd2, 50, 40)
Delay 30
Call Plugin.Bkgnd.LeftUp(Hwnd2, 90, 90)
ExitScript
End Sub
Sub OnScriptExit()
MessageBox "腳本已經停止!"
End Sub
===========================================
懇請各位大神幫幫我