//这个是神医后台学校 need_ver = "3.1233" PutAttachment "c:\test_game","*.*" PutAttachment ".\Plugin" ,"RegDll.dll" Call Plugin.RegDll.Reg("c:\test_game\dm.dll") set dm = createobject("dm.dmsoft") ver = dm.Ver() if ver <> need_ver then set dm = nothing set ws=createobject("Wscript.Shell") ws.run "regsvr32 c:\test_game\dm.dll /s" set ws=nothing Delay 1500 end if dm.SetPath "c:\test_game" hwnd = dm.GetMousePointWindow() dm_ret = dm.BindWindow(hwnd,"gdi","dx2","dx",0) // 下面就是脚本部分了 省略 i=0 Do While i=0 Delay 300 dm.MoveTo 55, 55 dm.LeftClick Delay 300 dm.KeyPress 57 // KeyPress key(6),1 For 5 call 斗气5 // call 九天神雷10 Next Delay 300 Loop Sub 斗气5 Delay 1000 dm.MoveTo 55, 55 dm.LeftClick Delay 300 dm.KeyPress 56 // KeyPress key(5),1 For 5 call 战魂技能 Next Delay 100 End Sub Sub 战魂技能 dm.KeyPress 71 // KeyPress key(9),1 Delay 500 dm.MoveTo 406, 297 dm.RightClick For 12 call 九天神雷10 Next Delay 300 End Sub Sub 九天神雷10 Delay 400 dm.MoveTo 55, 55 dm.LeftClick Delay 400 dm.KeyPress 81 Delay 1000 dm.KeyPress 87 Delay 400 dm.MoveTo 406, 297 dm.RightClick Delay 450 dm.MoveTo 55, 55 dm.LeftClick dm.KeyPress 69 Delay 1200 dm.MoveTo 55, 55 dm.LeftClick dm.KeyPress 69 Delay 1200 // dm.MoveTo 55, 55 // dm.LeftClick // dm.KeyPress 69 // Delay 1500 End Sub 下面这是脚本结束时执行的部分 Sub OnScriptExit() dm.UnBindWindow End Sub