I'd like to ping domain names using hs.ping to simplify some of my scripts and make them more reliable. Is this possible?
Announcement
Collapse
No announcement yet.
Can you use hs.ping to ping names
Collapse
X
-
taffyTags: None
-
taffy
How would I ping Yahoo.com. I get this msg when I attempt to run the script below.
3/30/2002 9:31:58 AM~!~Info~!~ Script Error, File: pingname.txt: 380: in line 2
Sub Main
DSL = hs.ping("yahoo.com", 2)
If DSL=0 Then
MsgBox "Success"
Else
MsgBox "failed"
'hs.WriteLog "Ping", "Result is " & r
End If
End Sub
Comment
-
billjohnson395
If you do:
Host="www.yahoo.com"
DSL = hs.Ping(Cstr(Host))
You will get an error. If you put Yahoo in /etc/hosts:
Yahoo 66.218.71.89
Then try:
Host="Yahoo"
DSL = hs.Ping(Cstr(Host))
You should have success!
Regards,
Comment
-
taffy
-
billjohnson395
Comment