回复 2楼瑞祥幽冥狼的帖子Dim 测试范围,iX,iY,x1,x2,y1,y2
测试范围 = Form1.InputBox1.Text
Call 获取游戏窗口("UnrealWindow", "晶核:魔导觉醒 ")
Call 自定范围(测试范围)
FindPic x1,x2,y1,y2,"C:\良辰辅助V3.1\挑战.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
TracePrint "找到"
MoveTo intX,intY
Else
TracePrint "找不到"
MoveTo iX+x1,iY+y1
Delay 1000
MoveTo iX+x2,iY+y2
End If
Function 自定范围(范围)
xy = 范围
要改变的Q=" "
变成Q = ""
xy = Replace(xy, 要改变的Q, 变成Q)
要改变的=","
变成 = "|"
xy = Replace(xy, 要改变的, 变成)
xy = split(xy, "|")
x1 = xy(0)
y1 = xy(1)
x2 = xy(2)
y2 = xy(3)
TracePrint x1&y1&x2&y2
End Function
Function 获取游戏窗口(类名, 标题)
//设置窗口位置、大小
晶核 = Plugin.Window.Find(类名, 标题)
晶核客户区大小 = Plugin.Window.GetClientRect(晶核)
Dim MyArray
MyArray=Split(晶核客户区大小,"|")
iX=MyArray(0)
iY = MyArray(1)
iX1 = MyArray(2)
iY1=MyArray(3)
TracePrint iX&","&iY
Delay 1000
TracePrint iX1 & "," & iY1
End Function