vipe7 Posted May 25, 2020 Posted May 25, 2020 Hello everyone, 1st i wanna excuse if this code is published somewhere... i took it from rainmeter forums and edited it a little bit, but now im facing a problem Everything works fine... the thing i need is once i receive the MAC address to be with ":" between numbers or even "" instead "-" like atm 2nd sorry for my bad English Here is the code: #NoTrayIcon #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseUpx=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" $Cmd = Run(@ComSpec & " /c " & 'getmac /fo list', "", @SW_HIDE, $STDOUT_CHILD) While 1 $Out = $Out & StdoutRead($Cmd) If @error Then ExitLoop Wend $RegExp = "(?siU).*: (.*)\r\n" $MACAddress = StringRegExp($Out, $RegExp, 3) if IsArray($MACAddress) Then ShellExecute($ProgramPath, "!RainmeterSetVariable zMACAddressTEST " & $MACAddress[0]) Else ShellExecute($ProgramPath, "!RainmeterSetVariable zMACAddressTES Unknown") EndIf EndIf Exit
algiuxas Posted May 27, 2020 Posted May 27, 2020 It would be nice if you'd share your solution with others, you'll never know if you have the same problem again After switching years ago to Linux, sadly I don't use AutoIt anymore.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now