TA的每日心情 | 无聊 4 天前 |
---|
签到天数: 530 天 连续签到: 2 天 [LV.9]测试副司令
|
1测试积点
星际争霸2 大漠和361插件后台鼠标无效
在前台能用运行,但是打开其他软件时后台鼠标停了(后台键盘脚本可以来)
用大漠绑定测试工具设置公共属性测试成功dx.public.active.api|dx.public.active.message
但是脚本运行还是存在后台鼠标无效的情况,
- hwnd = Plugin.Window.Find("StarCraft II", "《星际争霸II》")
- TracePrint hwnd
- //hwnd = dm.GetForegroundFocus()
- //hwnd = dm.GetMousePointWindow()
- //这个返回的就是那个句柄 这里存到变量hwnd里
-
- Call Plugin.RegDll.Reg("C:\test_game\\dm.dll")
- Set dm = createobject("dm.dmsoft")
- ver = dm.Ver()
- TracePrint ver
- dm_ret = dm.Reg("yonghu84f875b03fb0d5c536a56a631156628a","yk9406696") // abcdefg是您的注册码. 在大漠插件网站后台可以直接获取.
-
- if dm_ret <> 1 then
-
- messagebox "注册失败,返回值是:"&dm_ret
-
- endscript
-
- end if
-
- mouse="dx.mouse.position.lock.api|dx.mouse.position.lock.message|dx.mouse.focus.input.api|dx.mouse.focus.input.message|dx.mouse.clip.lock.api|dx.mouse.input.lock.api|dx.mouse.state.api|dx.mouse.state.message|dx.mouse.api|dx.mouse.cursor|dx.mouse.raw.input|dx.mouse.input.lock.api2|dx.mouse.input.lock.api3"
- public1="dx.public.active.api|dx.public.active.message|dx.public.active.api2|dx.public.anti.api|dx.mouse.position.lock.api|dx.mouse.position.lock.message|dx.mouse.focus.input.api|dx.mouse.focus.input.message|dx.mouse.clip.lock.api|dx.mouse.input.lock.api|dx.mouse.state.api|dx.mouse.state.message|dx.mouse.api|dx.mouse.cursor|dx.mouse.raw.input|dx.mouse.input.lock.api2|dx.mouse.input.lock.api3"
- public2 = "dx.public.active.api|dx.public.active.message|dx.public.fake.window.min|dx.public.disable.window.show"
- dm_ret = Plugin.WindowEx5_01.GetWindowState(hwnd, 1)//用361插件在绑定前激活窗口
- If dm_ret = 0 Then
- MessageBox "还没有激活!"
- Else
- MessageBox "已经激活了! "
- End If
- Call Plugin.WindowEx5_01.SetWindowState(hwnd, 1)
- dm_ret = Plugin.WindowEx5_01.GetWindowState(hwnd, 1)
- If dm_ret = 0 Then
- MessageBox "激活失败!"
- Else
- MessageBox "激活成功! "
- End If
- Delay 500
- dm_ret = dm.BindWindowEx(hwnd,"dx2","windows3","windows",pulic2,0)
- //dm_ret=1
- If dm_ret = 0 Then
- MessageBox "绑定失败!"
- Else
- MessageBox "绑定成功! "
- End If
- //获取标题栏
- //title = dm.GetWindowTitle(hwnd)
- //获取窗口分辨率
- //dm_ret = dm.GetClientSize(hwnd, w, h)
- //TracePrint "宽度:"&w&",高度:"&h
- //Plugin.D361Wnd.SetFakeActive
- Plugin.WindowEx5_01.SetFakeActive hwnd, 0
- //循环一
- Do
- //Exit do
- Delay 50
- dm.moveto 684,41
- Delay 50
- dm.leftclick
- Delay 50
- dm.moveto 55,691
- Delay 50
- dm.leftclick
- Delay 50
-
- Delay 50
- dm.moveto 684,41
- Delay 50
- dm.leftclick
- Delay 50
- dm.moveto 135,698
- Delay 50
- dm.leftclick
- Delay 50
-
- dm.moveto 684,41
- Delay 50
- dm.leftclick
- Delay 50
- dm.moveto 55,764
- Delay 50
- dm.leftclick
- Delay 50
-
- dm.moveto 684,41
- Delay 50
- dm.leftclick
- Delay 50
- dm.moveto 121,787
- Delay 50
- dm.leftclick
- Delay 50
-
- dm.moveto 684,41
- Delay 50
- dm.leftclick
- Delay 50
- dm.moveto 182,763
- Delay 50
- dm.leftclick
- Delay 50
-
- dm.moveto 802,522
- Delay 50
- dm.leftclick
- Delay 50
- dm.moveto 186,660
- Delay 50
- dm.leftclick
- Delay 50
- dm.moveto 165,738
- Delay 50
- dm.leftclick
- Delay 50
- Loop
- //循环二
- Do
- Exit do
- Delay 50
- dm.moveto 612,31
- Delay 50
- dm.leftclick
- Delay 50
- dm.moveto 48,588
- Delay 50
- dm.leftclick
- Delay 50
-
- Delay 50
- dm.moveto 612,31
- Delay 50
- dm.leftclick
- Delay 50
- dm.moveto 47,648
- Delay 50
- dm.leftclick
- Delay 50
-
- dm.moveto 612,31
- Delay 50
- dm.leftclick
- Delay 50
- dm.moveto 114,591
- Delay 50
- dm.leftclick
- Delay 50
-
- dm.moveto 612,31
- Delay 50
- dm.leftclick
- Delay 50
- dm.moveto 104,667
- Delay 50
- dm.leftclick
- Delay 50
-
- dm.moveto 612,31
- Delay 50
- dm.leftclick
- Delay 50
- dm.moveto 154,644
- Delay 50
- dm.leftclick
- Delay 50
-
- dm.moveto 714,443
- Delay 50
- dm.leftclick
- Delay 50
- dm.moveto 216,571
- Delay 50
- dm.leftclick
- Delay 50
- dm.moveto 206,644
- Delay 50
- dm.leftclick
- Delay 50
- loop
- //使用完后,释放窗口 不0释放鼠标键盘没法操作
- //dm_ret = dm.UnBindWindow()
-
-
-
复制代码
|
|