hallo ich bins nochma
kann ich wenn ich einen ping mit run ausführe einen @error auslesen?
hallo ich bins nochma
kann ich wenn ich einen ping mit run ausführe einen @error auslesen?
Was meinst du mit
Zitateinen ping mit run
?
run("ping xxx.xxx.xxx.xxx")
Aha und wieso nicht
[autoit]Ping ( "address/hostname" [, timeout] )
If @error then blaa..
?
weil das abartig lahm is
Hab hier noch was rausgekramt (Wow, das ist ja schon Steinalt.)
[ offen ] Ip Scanner Problem
Hi,
teste mal diese hier:
$ip = "127.0.0.1"
[/autoit] [autoit][/autoit] [autoit]MsgBox(0,"",_ping($ip))
[/autoit] [autoit][/autoit] [autoit]Func _ping($f_ip= "127.0.0.1")
Local $f_out_read
Local $f_err_read
$pid = Run(@ComSpec & " /c " & 'ping '&$f_ip, "", @SW_HIDE,6)
While 1
$f_out_read &= StdOutRead($pid)
If @error = 2 then ExitLoop
sleep(100)
Wend
While 1
$f_err_read &= StderrRead($pid)
If @error = 2 then ExitLoop
sleep(100)
Wend
Return "Output " &$f_out_read &@CRLF&"Error "&@CRLF& $f_err_read
StdioClose($pid)
EndFunc
MfG
Der_Doc