ChrisL 10 Report post 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 Share this post Link to post Share on other sites
jpm 42 Report post Posted December 7, 2006 not too difficult If @error Then Return 0 the error return has changed Share this post Link to post Share on other sites
ChrisL 10 Report post 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 Share this post Link to post Share on other sites