ok... here is a basic script. I'll UDF this eventually


Code:

break on


gets $name ; or $name=''
if $name
$nul = wshpipe('net send '+$name+' ""',1)
$str = WshPipe('cmd /c nbtstat -c | find "'+ucase($name)+'"',1)
if not @error
for each $entry in $str
$ip = trim(substr($entry,41,16))
? $ip
next
else
? $name+" not found"
endif
endif

Function WshPipe($ShellCMD, OPTIONAL $NoEcho)
Dim $oExec, $Output
$oExec = CreateObject("WScript.Shell").Exec($ShellCMD)
If Not VarType($oExec)=9 $WshPipe="WScript.Shell Exec Unsupported" Exit 10 EndIf
$Output = $oExec.StdOut.ReadAll + $oExec.StdErr.ReadAll
If Not $NoEcho $Output Endif
$WshPipe=Split($Output,@CRLF)
Exit($oExec.ExitCode)
EndFunction

_________________________
How to ask questions the smart way <-----------> Before you ask