Guest Uwe Posted June 28, 2005 Share Posted June 28, 2005 I just want to test if a station responds within a given time. The following script reports a '1' as roundtrip time. However a 'ping 123.123.123.123' in a command window (Windows 2000 SP4) results a 'Destination host not reachable' (Zielhost nicht erreichtbar). How can I test if "123.123.123.123" is present or not? $var = Ping("123.123.123.123",250) If $var Then Msgbox(0,"Status","Online, roundtrip was:" & $var) Else Msgbox(0,"Status","An error occured with number: " & @error) EndIf BTW: Windows without AutoIt is like a car without wheels... Link to comment Share on other sites More sharing options...
Holger Posted June 28, 2005 Share Posted June 28, 2005 Hi Uwe normally there is no bug Yeah, but I found a better possibility to check for the error. I will test it today or tomorrow in the later evening under different OS's. Thanks for info and regards Holger Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView Link to comment Share on other sites More sharing options...
BigBadWeirdo Posted June 28, 2005 Share Posted June 28, 2005 Uh i'm new in programming but i think this sentence: If $var Then is wrong cause you don't check what $var has to be or not... Don't blame me if wrong Link to comment Share on other sites More sharing options...
w0uter Posted June 28, 2005 Share Posted June 28, 2005 AFAIK. "If $var" equals "If $var >= 1" "If NOT $var" equals "If $var = 0" My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
Holger Posted June 28, 2005 Share Posted June 28, 2005 No, the problem is the internal handling. You can ping this address and the problem is when there is a network message like: "Answer from X.X.X.X: Destation host unreachable" So for the command there is an answer so the connection is ok but it isn't. Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now