按键精灵脚本多开窗口控制
操作方法
- 01
可以改成很强大的副本组队打怪功能,比如dps+mt+奶妈。每个角色都进行互不干扰的操作 Dimenv 窗口1, 窗口2, 窗口3 //这里要填写大漠注册部分 //=============================================== set dm = createobject("dm.dmsoft") hwnds = dm.EnumWindow(0,"游戏-","",1+4+8+16) hwnds = split(hwnds,",") TracePrint UBound(hwnds) If UBound(hwnds) > 2 Then MsgBox "窗口数量大于限制" ExitScript Else If UBound(hwnds) = 0 Then 窗口1 = dm.GetWindow(hwnds(0), 1) Call 单开操作() ElseIf UBound(hwnds) = 1 Then 窗口1 = dm.GetWindow(hwnds(0), 1) 窗口2 = dm.GetWindow(hwnds(1), 1) Call 双开操作() ElseIf UBound(hwnds) = 2 Then 窗口1 = dm.GetWindow(hwnds(0), 1) 窗口2 = dm.GetWindow(hwnds(1), 1) 窗口3 = dm.GetWindow(hwnds(2), 1) Call 三开操作() End If End If Do Delay 100 Loop Sub 单开操作() BeginThread 窗口1操作() End Sub Sub 双开操作() BeginThread 窗口1操作() Delay 3000 BeginThread 窗口2操作() End Sub Sub 三开操作() BeginThread 窗口1操作() Delay 3000 BeginThread 窗口2操作() Delay 3000 BeginThread 窗口3操作() End Sub Sub 窗口1操作() Set dm = createobject("dm.dmsoft") dm_ret = dm.SetWindowState(窗口1,12) Delay 1000 dm_ret = dm.BindWindow(窗口1, "normal", "windows", "windows", 0) a=0 For 60 a=a+1 dm.SendString 窗口1,"c"&a Delay 300 Next End Sub Sub 窗口2操作() Set dm = createobject("dm.dmsoft") dm_ret = dm.SetWindowState(窗口2,12) Delay 1000 dm_ret = dm.BindWindow(窗口2, "normal", "windows", "windows", 0) a=0 For 60 a=a+1 dm.SendString 窗口2,"a"&a Delay 300 Next End Sub Sub 窗口3操作() Set dm = createobject("dm.dmsoft") dm_ret = dm.SetWindowState(窗口3,12) Delay 1000 dm_ret = dm.BindWindow(窗口3, "normal", "windows", "windows", 0) a=0 For 60 a=a+1 dm.SendString 窗口3,a Delay 300 Next End Sub