Global Hwnd
Call 注册大漠()//自己需要注册
HwndEx = Plugin.Window.Search("【你的游戏顶层句柄名称】")
//你的游戏顶层句柄名称
MyArray = split(Hwndex, "|")
If UBound(myarray) >= 0 Then
For i = 0 To UBound(myarray) - 1
hwnd = clng(myarray(i))
//下面这句
TracePrint "目标句柄为:" & hwnd
xID = BeginThread(主线)
yID = BeginThread (子线)
Delay 500
Next
End If
Sub 主线()
HD = hwnd
Set dm = createobject("dm.dmsoft")
dm_ret = dm.setpath("C:\test_game\")
For 5
//绑定
dm_ret = dm.bindwindow(HD, "图色绑定模式", "鼠标绑定模式", "键盘绑定模式", 0)
If dm_ret = 1 Then
TracePrint "绑定成功"
Exit For
Else
TracePrint "绑定失败"
End If
Delay 400
Next
Do
Call 你想做的事情()
Loop
End Sub
Sub 子线()
HD = hwnd
Set dm = createobject("dm.dmsoft")
dm_ret = dm.setpath("C:\test_game\")
For 5
//绑定
dm_ret = dm.bindwindow(HD, "图色绑定模式", "鼠标绑定模式", "键盘绑定模式", 0)
If dm_ret = 1 Then
TracePrint "绑定成功"
Exit For
Else
TracePrint "绑定失败"
End If
Delay 400
Next
Do
Call 你想做的事情()
Loop
End Sub
联系客服