If looking at a single workstation, I would simply parse the results from the ARP command. The code might look something like this:
; This UDF function executes a DOS command and returns the
; sysout, syserror and exitcode information from the DOS
; program as a 3 element array
; Elements Contents
; 0 ErrorLevel
; 1 StdOut
; 2 StdError
;Note: No way yet known to hide the DOS window from appearing on the screen
;except to perhaps have a "Keep on top" conver screen
;(i.e. BoxesUp and other box functions + IntControl(54,1,0,0,0)
#DefineFunction CaptureDosOutput(DosCommand)
DataArray=ArrDimension(3) ;Allocate return array
ArrInitialize(DataArray,"") ;initialize to all null strings
oShell = ObjectOpen("WScript.Shell") ;open shell object
oScriptExec = oShell.Exec(DosCommand) ;run the command
;Open output objects
oStdOut = oScriptExec.StdOut
oStdErr = oScriptExec.StdErr
While (oScriptExec.Status==0) ;wait for completion
;Caputure StdOut data
oStdOut = oScriptExec.StdOut
While ! oStdOut.AtEndOfStream
strLine = oStdOut.ReadLine
DataArray[1] = StrCat(DataArray[1],strLine,@CRLF)
EndWhile
;Capture StdErr data
oStdErr = oScriptExec.StdErr
While ! oStdErr.AtEndOfStream
strLine = oStdErr.ReadLine
DataArray[2] = StrCat(DataArray[2],strLine,@CRLF)
EndWhile
TimeDelay(0.1)
EndWhile
;Get remainder of data, if any
;Caputure StdOut data
oStdOut = oScriptExec.StdOut
While ! oStdOut.AtEndOfStream
strLine = oStdOut.ReadLine
DataArray[1] = StrCat(DataArray[1],strLine,@CRLF)
EndWhile
;Capture StdErr data
oStdErr = oScriptExec.StdErr
While ! oStdErr.AtEndOfStream
strLine = oStdErr.ReadLine
DataArray[2] = StrCat(DataArray[2],strLine,@CRLF)
EndWhile
DataArray[0]=oScriptExec.ExitCode ;save errorlevel/exit code
;Close handles that were opened
ObjectClose(oStdOut)
ObjectClose(oStdErr)
ObjectClose(oScriptExec)
ObjectClose(oShell)
;Return the array
Return(DataArray)
#EndFunction
DirChange("c:\windows")
CaptureArray=CaptureDosOutput("arp -a") ; for normal DOS executables
;CaptureArray=CaptureDosOutput("cmd.exe /c dir *.*") ; for built-in dos commands
result = CaptureArray[1]
;clipput(result)
;Pause(StrCat("Exit code: ",CaptureArray[0]),result)
If CaptureArray[0] !=0 Then Pause("SysErr info",CaptureArray[2])
;SAMPLE RESULTS
;Interface: 10.0.0.25 --- 0xb
; Internet Address Physical Address Type
; 10.0.0.1 00-05-b2-2f-21-91 dynamic
; 255.255.255.255 ff-ff-ff-ff-ff-ff static
;Locate the ipaddress using the MAC address
MACaddress = 'ff-ff-ff-ff-ff-ff'
macptr = StrIndexNc( result, MACaddress, 1, @Fwdscan )
If macptr == 0
Message("Sorry...", "MAC Address Not found")
Exit
EndIf
beginlineptr = StrIndexNc( result, @lf, macptr, @Backscan )
If macptr == 0
Message("Sorry...", "MAC Address Not found")
Exit
EndIf
spaceptr = StrIndexNc( result, " ", beginlineptr+3, @Fwdscan )
If spaceptr == 0
Message("Sorry...", "IP Address Not found")
Exit
EndIf
IPAddress = StrSub( result, beginlineptr, spaceptr-beginlineptr )
Pause( MACaddress, IPAddress)
However, it appears that you want to search the network looking for a particular MAC address. Unfortunately it is not that straight forward. You would need to bind to each computer and check to see if the MAC address can be found on that machine. this can be handles using WMI. Please read:
http://blogs.technet.com/b/heyscriptingguy/archive/2006/01/24/how-can-i-display-the-ip-addresses-associated-with-a-given-mac-address.aspx