按键精灵大漠后台单脚本多窗口绑定 30
Dimhwnd_all(4)hwnd_all(0)=1111hwnd_all(1)=2222hwnd_all(2)=3333hwnd_all(3)=4444Dimdm_a...
Dim hwnd_all(4)
hwnd_all(0)=1111
hwnd_all(1)=2222
hwnd_all(2)=3333
hwnd_all(3)=4444
Dim dm_all(4)
Set dm_all(0) = createobject("dm.dmsoft")
Set dm_all(1) = createobject("dm.dmsoft")
Set dm_all(2) = createobject("dm.dmsoft")
Set dm_all(3) = createobject("dm.dmsoft")
Set dm = nothing
hwnd = 0
hwndE = Plugin.Window.SearchEx(WSWINDOW,"新大话西游2 ",0)
Set dm_all= split(hwndE, "|")
For i = 0 To 3
Call 切换对象(o)
dm_ret= dm.BindWindowEx(hwnd, "normal", "dx.mouse.position.lock.api|dx.mouse.position.lock.message|dx.mouse.clip.lock.api|dx.mouse.input.lock.api|dx.mouse.state.api|dx.mouse.api", "dx.keypad.input.lock.api|dx.keypad.state.api|dx.keypad.api", "dx.public.active.api", 0)
Delay 50
If dm_ret = 0 Then
MessageBox "绑定失败"
EndScript
End If
Next
For i = 0 To 2
Call 切换对象(o)
dm.SetPath ".\plugin\大漠梦想"
Next
Do
For i = 0 To 3
Call 切换对象(o)
Call aaa
Next
Loop
Sub 切换对象(index)
Set dm = dm_all(index)
hwnd = hwnd_all(index)
End Sub
Sub aaa()
i = 0
While i=0
dm_ret = dm.FindPic(243,243,479,401,"st.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.MoveTo intX+20 , intY-5
Delay 10
dm.LeftClick
Delay 10
i=i+1
End If
Wend
While i=1
dm_ret = dm.FindPic(130,157,524,438,"gs.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.MoveTo intX,intY+80
Delay 10
dm.LeftClick
Delay 10
i=i+1
End If
Wend
While i=2
dm_ret = dm.FindPic(130,157,524,438,"tx.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.MoveTo intX+8,intY+5
Delay 20
dm.LeftClick
Delay 10
dm.MoveTo intX + 100,intY + 100
Delay 10
i=i+1
End If
Wend
While i=3
dm_ret = dm.FindPic(130,157,524,438,"qd1.bmp|qd5.bmp","000000",0.8,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.MoveTo intX+8,intY+5
Delay 2
dm.LeftClick
Delay 1
dm.MoveTo intX+100, intY+100
Delay 1
i=i+1
End If
Wend
While i=4
dm_ret = dm.FindPic(130,157,524,438,"mj1.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.MoveTo intX,intY+60
Delay 2
dm.LeftClick
Delay 1
i=i+1
End If
Wend
End Sub
Sub OnScriptExit()
// 分别解绑窗口
For i = 0 To 3
Call 切换对象(o)
dm_ret = dm.UnBindWindow()
Next
End Sub
我想说的是 我抄袭的 接口说明里面的
这个要怎么改才能正确啊
提示绑定时无效的窗口句柄 展开
hwnd_all(0)=1111
hwnd_all(1)=2222
hwnd_all(2)=3333
hwnd_all(3)=4444
Dim dm_all(4)
Set dm_all(0) = createobject("dm.dmsoft")
Set dm_all(1) = createobject("dm.dmsoft")
Set dm_all(2) = createobject("dm.dmsoft")
Set dm_all(3) = createobject("dm.dmsoft")
Set dm = nothing
hwnd = 0
hwndE = Plugin.Window.SearchEx(WSWINDOW,"新大话西游2 ",0)
Set dm_all= split(hwndE, "|")
For i = 0 To 3
Call 切换对象(o)
dm_ret= dm.BindWindowEx(hwnd, "normal", "dx.mouse.position.lock.api|dx.mouse.position.lock.message|dx.mouse.clip.lock.api|dx.mouse.input.lock.api|dx.mouse.state.api|dx.mouse.api", "dx.keypad.input.lock.api|dx.keypad.state.api|dx.keypad.api", "dx.public.active.api", 0)
Delay 50
If dm_ret = 0 Then
MessageBox "绑定失败"
EndScript
End If
Next
For i = 0 To 2
Call 切换对象(o)
dm.SetPath ".\plugin\大漠梦想"
Next
Do
For i = 0 To 3
Call 切换对象(o)
Call aaa
Next
Loop
Sub 切换对象(index)
Set dm = dm_all(index)
hwnd = hwnd_all(index)
End Sub
Sub aaa()
i = 0
While i=0
dm_ret = dm.FindPic(243,243,479,401,"st.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.MoveTo intX+20 , intY-5
Delay 10
dm.LeftClick
Delay 10
i=i+1
End If
Wend
While i=1
dm_ret = dm.FindPic(130,157,524,438,"gs.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.MoveTo intX,intY+80
Delay 10
dm.LeftClick
Delay 10
i=i+1
End If
Wend
While i=2
dm_ret = dm.FindPic(130,157,524,438,"tx.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.MoveTo intX+8,intY+5
Delay 20
dm.LeftClick
Delay 10
dm.MoveTo intX + 100,intY + 100
Delay 10
i=i+1
End If
Wend
While i=3
dm_ret = dm.FindPic(130,157,524,438,"qd1.bmp|qd5.bmp","000000",0.8,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.MoveTo intX+8,intY+5
Delay 2
dm.LeftClick
Delay 1
dm.MoveTo intX+100, intY+100
Delay 1
i=i+1
End If
Wend
While i=4
dm_ret = dm.FindPic(130,157,524,438,"mj1.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.MoveTo intX,intY+60
Delay 2
dm.LeftClick
Delay 1
i=i+1
End If
Wend
End Sub
Sub OnScriptExit()
// 分别解绑窗口
For i = 0 To 3
Call 切换对象(o)
dm_ret = dm.UnBindWindow()
Next
End Sub
我想说的是 我抄袭的 接口说明里面的
这个要怎么改才能正确啊
提示绑定时无效的窗口句柄 展开
3个回答
AiPPT
2024-09-19 广告
2024-09-19 广告
随着AI技术的飞速发展,如今市面上涌现了许多实用易操作的AI生成工具1、简介:AiPPT: 这款AI工具智能理解用户输入的主题,提供“AI智能生成”和“导入本地大纲”的选项,生成的PPT内容丰富多样,可自由编辑和添加元素,图表类型包括柱状图...
点击进入详情页
本回答由AiPPT提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询