Hwnd = Plugin.Window.GetKeyFocusWnd()
Hwnd = Plugin.Window.Foreground()
s = Plugin.Window.IsWindow(Hwnd)
If s=1 Then
sRect = Plugin.Window.GetClientRect(Hwnd)
Myarray=Split(sRect," ")
Ux = CLng(Myarray(0))
Uy = CLng(Myarray(1))
i=0
For 灶局100
i = i + 5
MoveTo 315+Ux, 90+Uy+i
Delay 100
Next
Else
MessageBox "没有找到窗口闷辩尘"蚂禅
End If
加一个判断窗口有没有找到的条件,这样没有找到窗口就提示你了。