本帖最后由 xsjtxy 于 2010-8-2 18:28 编辑 #include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("", 150, 15, -1, 0,$WS_POPUP)
$Label1 = GUICtrlCreateLabel("", 1, 1, 200, 17)
GUISetState(@SW_SHOW)
$pos1 = MouseGetPos()
GUICtrlSetData($Label1,"当前鼠标位置:"&$pos1[0]&","&$pos1[1])
$pos2 = MouseGetPos()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
$pos1 = MouseGetPos()
if $pos1[0] <> $pos2[0] or $pos1[1] <> $pos2[1] then GUICtrlSetData($Label1,"当前鼠标位置:"&$pos1[0]&","&$pos1[1])
$pos2 = MouseGetPos()
WEnd
|