- UID
- 548398
- 主题
- 注册时间
- 2019-9-25
- 在线时间
- 小时
- 最后登录
- 1970-1-1
签到天数: 2 天 [LV.1]初来乍到
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?点击注册
x
本帖最后由 jumio 于 2019-9-27 16:49 编辑
在论坛逛了一圈没有发现提到物理地址显示的帖子,我就来发一篇大家讨论下。
我用autoit 做的脚本来调用mac地址信息,雨滴插件再调用脚本数据显示出来。
这个插件显示MAC地址由于转换问题大概要10秒后才会显示出来。
雨滴皮肤
- [Rainmeter]
- Update=1000
- DynamicWindowSize=1
- [Metadata]
- Name=NETADDRESS
- Author=Jumio
- Information=Network Information
- Version=Sep 9, 2019
- [Variables]
- ;Set this if needed
- Interface=Best
- MACAddress="Asking Hardware"
- Font=Trebuchet MS
- LabelColor=200,200,200
- ValueColor=200,200,200
- ;[Network WEB IP]=================================
- [MeasureIPLan]
- Measure=Plugin
- Plugin=Plugins\SysInfo.dll
- SysInfoType=IP_ADDRESS
- SysInfoData=0
- [MeterIPLabel]
- Meter=String
- X=0r
- Y=0r
- FontFace=#Font#
- FontColor=#LabelColor#
- FontSize=9
- StringStyle=Normal
- StringAlign=Left
- AntiAlias=1
- Text="IP地址:"
- [MeterLANIPText]
- Meter=String
- MeasureName=MeasureIPLan
- X=160r
- Y=2r
- FontFace=#Font#
- FontColor=#ValueColor#
- FontSize=9
- StringStyle=Normal
- StringAlign=Right
- AntiAlias=1
- [MeasureAdapterDesc]
- Measure=Plugin
- Plugin=Plugins\SysInfo.dll
- SysinfoType=ADAPTER_DESCRIPTION
- SysInfoData=0
- [MeasureFireAction]
- Measure=Calc
- Formula=Counter % 30
- IfEqualValue=0
- IfEqualAction=!Execute ["#CURRENTPATH#MAC.exe" "#CURRENTCONFIG#" "#PROGRAMPATH#" "[MeasureAdapterDesc]"]
- [MeterShowMAC]
- Meter=String
- X=0
- Y=20r
- FontFace=#Font#
- FontSize=9
- FontColor=#ValueColor#
- StringStyle=Normal
- AntiAlias=1
- DynamicVariables=1
- Text=MAC地址: #MACAddress#
复制代码 autoit 脚本内容
- ; *** Start added by AutoIt3Wrapper ***
- #include <AutoItConstants.au3>
- ; *** End added by AutoIt3Wrapper ***
- #NoTrayIcon
- #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
- #AutoIt3Wrapper_UseUpx=y
- #AutoIt3Wrapper_Compile_Both=y
- #AutoIt3Wrapper_Change2CUI=n
- #AutoIt3Wrapper_Add_Constants=n
- #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
- #include <Constants.au3>
- #include <Array.au3>
- Local $Out
- if $CmdLine[0] = 3 Then
- $ConfigPath = $CmdLine[1]
- $ProgramPath = $CmdLine[2] & "Rainmeter.exe"
- $NICName = $CmdLine[3]
- $Cmd = Run(@ComSpec & " /c " & 'ipconfig /all', "", @SW_HIDE, $STDOUT_CHILD)
- While 1
- $Out = $Out & StdoutRead($Cmd)
- If @error Then ExitLoop
- Wend
- $NICName=StringReplace($NICName, "", "\\(")
- $NICName=StringReplace($NICName, "(", "\(")
- $NICName=StringReplace($NICName, ")", "\)")
- $NICName=StringReplace($NICName, "[", "\[")
- $NICName=StringReplace($NICName, "]", "\]")
- $RegExp = "(?siU)" & $NICName & ".*物理地址. . . . . . . . . . . . . : (.*)\n"
- $MACAddress = StringRegExp($Out, $RegExp, 3)
- if IsArray($MACAddress) Then
- ShellExecute($ProgramPath, "!RainmeterSetVariable MACAddress " & $MACAddress[0] & " " & $ConfigPath)
- Else
- ShellExecute($ProgramPath, "!RainmeterSetVariable MACAddress Unknown" & " " & $ConfigPath)
- EndIf
- EndIf
- Exit
复制代码
|
|