Delay 100 Else Goto 交还银票 End If //ESC 一次 Delay 200 dm.KeyPress 27 Delay 500 End Sub //====================音乐报警脚本====================== //选择MP3文件路径 Dim MP3 MP3 = Plugin.File.SelectFile() //打开选择文件对话框 If UCase(Right(MP3,4)) = ".MP3" Or UCase(Right(MP3,4)) = ".WAV" Then Form1.路径.Text = MP3 Else If MP3 <> "" Then MsgBox "请选择“.mp3或者.wav”音乐格式的文件!" End If End If //播放音乐测试 Call Plugin.Media.Play(Form1.路径.Text) Event Form1.UnLoad Call Plugin.Media.Stop() End Event //====================关闭窗口脚本====================== Sub 关闭 dm.KeyPress 27 Delay 500 Rem 关闭窗口 dm_ret = dm.FindPic(0, 0, 800, 600, "关闭.bmp","000000",0.9,0,intX,intY) If intX > 0 and intY > 0 dm.KeyPress 27 Delay 100 Goto 关闭窗口 End If End Sub //===================答题脚本====================== Sub 答题 dm_ret = dm.FindPic(0, 0, 800, 600,"C:\TLPS\挂机.bmp","000000",0.9,0,intX,intY) If intX >= 0 and intY >= 0 Then Call Plugin.Media.Beep(659, 1600) Delay 1000 //播放路径下的“报警”音乐文件 Call Plugin.Media.Play(Form1.路径.Text) Delay 2000 If Form1.答题.ListIndex = 0 Then Call 手动答题 ElseIf Form1.答题.ListIndex = 1 Then Call 远程答题 End If Call Plugin.Media.Stop() End If End Sub Sub 手动答题 //获取反挂机坐标 Rem 手动答题 dm_ret = dm.FindPic(0, 0, 800, 600,"C:\TLPS\答题.bmp","000000",0.9,0,intX,intY) If intX >= 0 and intY >= 0 Then Delay 2000 Else Goto 手动答题 End If Dim 编号 //获取答案,确定坐标 编号 = InputBox("请输入答案编号1,2,3,4") Delay 2000 If 编号 = 1 Then dm.MoveTo intX + 55, intY + 175 Delay 50 dm.LeftClick Delay 1000 dm.MoveTo intX + 135, intY + 275 Delay 50 dm.LeftClick Delay 1000 ElseIf 编号 = 2 Then dm.MoveTo intX + 55, intY + 200 Delay 50 dm.LeftClick Delay 1000 dm.MoveTo intX + 135, intY + 275 Delay 50 dm.LeftClick Delay 1000