'= , = , = ; = , =, = , = ,= , = '2007 by ytwinky, MD Dim Shared As Integer Fehler, Okay Function PingIt(byVal IPName As String, _ byRef Anfang As String, _ byVal Ofs As Integer, _ byRef Ende As String, _ byVal Ofs2 As Integer=1) As String Dim As Integer Zeile=CsrLin, Spalte=Pos(), DNr=FreeFile Dim As String z, m Open pipe "Ping -a -n 1 " &IPName For Input As #DNr Do While Not Eof(DNr) Print "."; Line Input #DNr, m z+=m &!"\n" Loop Close DNr Locate Zeile, Spalte Print Space(40); Locate Zeile, Spalte Spalte=Instr(z, Anfang)+Ofs Anfang=Mid(z, Spalte, InStr(z, Ende)-Spalte-Ofs2) Fehler=Len(Anfang)>15 If Fehler Then Color 4, 7 Else Color 2, 7:Print " Okay ";:Color 7,0:Print " -->"; Okay+=1 End If Return Anfang End Function Dim As String p, s=Space(20) p="127.0.0.1" Print !"Check local IP-Configuation 2007 by ytwinky, MD\nPing " &p; p=PingIt(p, "Ping", 5, "[") 'Kuckma, ob 'ne Netzkarte da ist Print p &!"\nPing " &p; p=PingIt(p, "Ping", 5, "[") 'Kuckma, ob localhost aufgelst werden kann Print p &!"\nPing " &p; p=PingIt(p, "[", 1, "]", 0) 'Kuckma, ob der Netzwerkrechner ne IP hat Print p &!"\nPing ";p; p=PingIt(p, "Ping", 5, "[") 'Kuckma, ob die IP zum Computernamen aufgelst werden kann Print p Color 7, 0:Print Okay &"*";:Color 2, 7:Print " Okay ";:Color 7, 0:Print "==>"; If Okay=4 Then Print "OKAY!!!"; Else Color 4, 7 Print" Ooops, error.."; Color 7, 0 End If GetKey