Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
OstroSoft ICMP Component
 OstroSoft Forums : OstroSoft ICMP Component
Subject Topic: Ping doesn`t work inside For Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
dbianx
Newbie
Newbie


Joined: 06 December 2006
Online Status: Offline
Posts: 2
Posted: 06 December 2006 at 2:30pm | IP Logged Quote dbianx

Hello everybody , sorry for my english because i´m not english native speaker ..

I`m triying to make a code to send ping request to a full range of ip ...
If i try to send ping on this singles ip thats work ,

192.168.1.1 Sucessfull
192.168.1.2 Sucessfull
192.168.1.3 Sucessfull
192.168.1.4 Sucessfull
192.168.1.5 Sucessfull

But if i write a For and initialite the last byte of the ip , only sucessful is

192.168.1.1 Sucessfull
192.168.1.2 Timeout
192.168.1.3 Timeout
192.168.1.4 Timeout
192.168.1.5 Timeout

the simplify code is :


on error resume next
dim oping,host

set oping = createobject("OSICMP.ping")

host = "192.168.1."

For i = 1 to 5

oping.send host & i


          if err.number = 0 then
  
              wscript.echo host & i & " " & "Sucessfull" & " " & err.number
  
          elseif err.number = 11010 then
  
              wscript.echo host & i &  " " & "Time out" & " " & err.number
  
          else
  
              wscript.echo  host & i &  " " & err.number & " " & err.description & " " & err.number
  
          end if

next

Back to Top View dbianx's Profile Search for other posts by dbianx
 
dbianx
Newbie
Newbie


Joined: 06 December 2006
Online Status: Offline
Posts: 2
Posted: 06 December 2006 at 4:25pm | IP Logged Quote dbianx

Hi , i Found the resolution ........ woauuuuu


the good way to know if the response is good is


object.status = "Success"   



0 is not a good way for a lot of replys ...
Back to Top View dbianx's Profile Search for other posts by dbianx
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

Powered by Web Wiz Forums version 7.92
Copyright ©2001-2004 Web Wiz Guide