MessageBox "截取句柄脚本已起动!按空格键截取,按ESC键暂停!" Gosub jubing Rem mymain While 1 WaitKey ukey If ukey = 27 MessageBox "按空格键截取,按ESC键停止!" Gosub jubing EndIf EndWhile Sub jubing While 1 WaitKey x If x = 32 //下面这句是得到鼠标指向的窗口句柄 Plugin Hwnd = Window.MousePoint() MessageBox "句柄:"&Hwnd ElseIf x = 27 MessageBox "已停止截取句柄!按ESC键可以重新开始!" Goto mymain EndIf EndWhile Return