这样?
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 138, 86, 192, 114)
$Button1 = GUICtrlCreateButton("Button1", 24, 24, 75, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$Pos = ControlGetPos("Form1", "", $Button1)
$Name = GUICtrlRead($Button1)
MsgBox(0, 0, "名字:" & $Name & @LF & "X:" & $Pos[0] & @LF & "Y:" & $Pos[1] & @LF & "宽度:" & $Pos[2] & @LF & "高度:" & $Pos[3])
EndSwitch
WEnd
|