#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <ACN_NET.au3>
#include <GuiEdit.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("获取本机MAC地址", 439, 183, 650, 288)
$Label1 = GUICtrlCreateLabel("本机物理地址为:", 24, 16, 220, 31)
GUICtrlSetFont(-1, 20, 400, 0, "宋体")
$Edit1 = GUICtrlCreateEdit("", 24, 56, 393, 49, BitOR($GUI_SS_DEFAULT_EDIT,$ES_CENTER))
GUICtrlSetData(-1, "")
GUICtrlSetFont(-1, 20, 400, 0, "宋体")
$Button1 = GUICtrlCreateButton("确定",32 , 120, 137, 41)
$Button2 = GUICtrlCreateButton("复制", 272, 120, 161, 41)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$a=_API_Get_NetworkAdapterMAC (@IPAddress1)
$MAC=StringMid($a,1,2) &StringMid($a,4,2)&StringMid($a,7,2)&StringMid($a,10,2)&StringMid($a,13,2)&StringMid($a,16,2)
_GUICtrlEdit_AppendText($Edit1, $MAC)
Case $Button2
MsgBox(0,"哈哈","我也是刚学AU3的菜鸟,不会复制文本框内容,请指点!"& @CRLF & "还有文本框的滚动条也不知道如何去掉")
EndSwitch
WEnd