hwnd = cc.FindWindow("", "忘记时间时间爱你")
cc_ret = cc.SetWindowState(hwnd, 1)
// display: dx 鼠标:windows后台 键盘:windows后台 模式1
cc_ret = cc.BindWindow(hwnd, "dx", "dx", "dx", 1)
Delay 100
If cc_ret=0 Then
MessageBox "绑定“失败”"
ExitScript
End If
//脚本编写包括(移动游戏窗口、准备、开始)
Delay 100
cc.MoveWindow hwnd, 0, 300
//显示气泡提示信息
Call Plugin.Msg.Tips("移动游戏屏幕到指定位置")
Delay 500
Rem 小准
cc_ret = cc.FindPic(0,0,1024,768,"打开.bmp","000000",1,1,intX,intY)
If intX >= 0 and intY >= 0 Then
cc.Moveto 495,127
Delay 200
cc.LeftClick
Else
End If
//小号中的“一次找图”,判断是否开始游戏
Delay 200
cc_ret = cc.FindPic(0,0,1024,768,"确定.bmp","000000",1,1,intX,intY)
If intX >= 0 and intY >= 0 Then
Delay 200
cc.MoveTo 322,342
Delay 200
cc.LeftClick
Else
cc_ret = cc.FindPic(0,0,1024,768,"准备.bmp|开始游戏.bmp","000000",1,1,intX,intY)
If intX >= 0 and intY >= 0 Then
Delay 200
cc.moveto 55, 21
Delay 200
cc.leftclick
Else
Goto 检测2
End If
End If
Goto 小准
Rem 检测2
cc.KeyDown 87
Delay 100
cc.keypress 69
Delay 100
cc.keypress 32
cc_ret = cc.FindPic(0,0,1024,768,"x.bmp","000000",1,1,intX,intY)
If intX >= 0 and intY >= 0 Then
cc.KeyPress 82
Else
cc_ret = cc.FindPic(484,386,587,437,"300.bmp","000000",1,1,intX,intY)
If intX >= 0 and intY >= 0 Then
cc.KeyUp 87
cc.keyDown 68
Delay 2000
cc.KeyUp 68
End If
End If
Goto 小准
End Sub
//绑定之后,必须加上“这段代码”
//停止“主程序”和“每个线程”时,都会调用“这段代码”
Sub OnScriptExit()
aa_ret = aa.UnBindWindow()
End Sub