layer 2 Posted March 1, 2005 (edited) hey, i was using the Ping function and im a little unsure of how to get the extended info with @error... could someone give me an example of how to do this?From helpfile:When the function fails (returns 0) @error contains extended information: 1 = Host is offline 2 = Host is unreachable 3 = Bad destination 4 = Other errorsid like to know how to do that.. thanks! Edited March 1, 2005 by layer FootbaG Share this post Link to post Share on other sites
MHz 80 Posted March 1, 2005 Some examples for you: $result = Ping("www.hiddensoft.com",250) If $result = 1 Then MsgBox(0, 'Error', 'host is not pingable or other network errors occured and sets @error') If $result = 0 Then MsgBox(0, 'Success', 'Returned the roundtrip-time in milliseconds: ' & $result) If @error = 1 Then MsgBox(0, 'Error', 'Host is offline') If @error = 2 Then MsgBox(0, 'Error', 'Host is unreachable') If @error = 3 Then MsgBox(0, 'Error', 'Bad destination') If @error = 4 Then MsgBox(0, 'Error', 'Other errors') If @error Then MsgBox(0, 'Error', 'Unknown error') If Not @error Then MsgBox(0, 'Success', 'Host has been pinged') Just pick 1, or 2 or.... Share this post Link to post Share on other sites
layer 2 Posted March 1, 2005 thanks MHz! just what i was looking for! i can always count on you FootbaG Share this post Link to post Share on other sites