按键精灵坐标算法问题

1
2
3
4
5
6
7
Dimx1, y1//假设(x1,y1)是前台坐标
Rect = Plugin.Window.GetClientRect(Hwnd)
MyArray = Split(Rect, | )
x2 = Clng(MyArray(0))
y2 = Clng(MyArray(1))//(x2,y2)是游戏窗口客户区左上角的坐标
x = x1 - x2
y = y1 - y2//(x,y)就是楼主所需的后台坐标
似乎可以做为精华知识了。桌面坐标为x,y窗口坐标则为x-dx,y-dyPlugin s = Window.GetClientRect(hwnd)
XYArray = Split(s, | , -1, 1)
dx = XYArray(0)
dy = XYarray(1)