自己在用的一段代码,单网卡环境测试通过,多网卡不知道效果如何...#include <ACN_NET.au3>
msgbox(0,"本机的MAC地址是:",Getmac())
Func getmac()
Select
Case Not (@IPAddress1 = "0.0.0.0" Or @IPAddress1 = "127.0.0.1")
$sip = @IPAddress1
Case Not (@IPAddress2 = "0.0.0.0" Or @IPAddress2 = "127.0.0.1")
$sip = @IPAddress2
Case Not (@IPAddress3 = "0.0.0.0" Or @IPAddress3 = "127.0.0.1")
$sip = @IPAddress3
Case Not (@IPAddress4 = "0.0.0.0" Or @IPAddress4 = "127.0.0.1")
$sip = @IPAddress4
EndSelect
$mymac = _API_Get_NetworkAdapterMAC($sip)
return $mymac
EndFunc ;==>getmac
|