PolyJorge Posted August 4, 2009 Posted August 4, 2009 Please help me with this "Ping" script.. the code is working but i want to made it like.. i want to ping multiple IP.. around 10 IP's and it will display together.. any suggestion is Ok... Many Thanks HotKeySet("{ESC}", "Terminate") While $var = Ping("10.10.70.1",250) If $var Then; also possible: If @error = 0 Then ... ToolTip("10.10.70.1 = Online", 0, 0) Else ToolTip("10.10.70.1 = Offline", 0, 0) EndIf WEnd Func Terminate() Exit 0 EndFunc
BrettF Posted August 4, 2009 Posted August 4, 2009 Welcome, Try something like: For $i = 1 to 10 $ip = "192.168.0." & $i $var = Ping ($ip, 250) If $var Then ConsoleWrite ($ip & " is Online" & @CRLF) Else ConsoleWrite ($ip & " is Offline" & @CRLF) EndIf Next If you need different IPs (192.168.0.100 say, and 172.16.0.1 and others) you will probably need to search up on using arrays. Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
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