ChrisL Posted December 7, 2006 Share Posted December 7, 2006 Could someone point me in the right direction. This function no longer works with the beta. (Still can't get my head around stringregexp!) Thanks Func _GetMAC($getmacindex = 1) $ipHandle = Run(@ComSpec & ' /c ipconfig /all', '', @SW_HIDE, 2) Local $stream While NOT @error $stream = $Stream & StdoutRead($ipHandle) WEnd $macdashed = StringRegExp(StringStripWS($stream, 3), '([0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2})', 3) If Not @extended Then Return 0 If Not IsArray($macdashed) Then Return 0 If $getmacindex = 0 Then Return UBound($macdashed) If $getmacindex < - 1 Then Return 0 If $getmacindex > UBound($macdashed) Or $getmacindex = -1 Then $getmacindex = UBound($macdashed) $macsemicolon = StringReplace($macdashed[$getmacindex - 1], '-', ':', 0) Return $macsemicolon EndFunc;==>_GetMAC [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
jpm Posted December 7, 2006 Share Posted December 7, 2006 not too difficult If @error Then Return 0 the error return has changed Link to comment Share on other sites More sharing options...
ChrisL Posted December 7, 2006 Author Share Posted December 7, 2006 Thank you [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
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