Re: testing internet connection
Re: testing internet connection
- Subject: Re: testing internet connection
- From: "Stephen Swift (aka Burnum)" <email@hidden>
- Date: Fri, 22 Jun 2001 08:47:21 -0400
At 6/21/01 6:41 PM, Ingo Bitsch (email@hidden) Wrote:
>
I guess this has been asked one million times, but what is a
>
reliable way to test the availability of an internet connection
>
in an Applescript?
I'm not sure about other types but for a modem connection I use
The PPP Status command
Here's a script that came with my computer:
on run
try
set status to (PPP status)
on error
display dialog "Could not obtain the status of PPP."
exit repeat
end try
if (+class RAae; of status) then
set answerenabled to "true"
else
set answerenabled to "false"
end if
if (+class RAis; of status) then
set isserver to "true"
else
set isserver to "false"
end if
set button to button returned of ,
(display dialog ,
"Status of PPP connection:" & return & return & ,
tab & "State: " & (state of status) & return & ,
tab & "Seconds connected: " & (seconds connected of status)
& return & ,
tab & "Seconds remaining: " & (seconds remaining of status)
& return & ,
tab & "Message: " & (message of status) & return & ,
tab & "Protocol: " & (+class RAsp; of status) & return & ,
tab & "Bytes received: " & (bytes in of status) & return & ,
tab & "Bytes transmitted: " & (bytes out of status) ,
buttons {"Cancel", "Update"} default button ,
"Update")
end repeat
end run
Stephen Swift ?' The Burnum Man
email@hidden
-----------------------------------------------
"The Byte Shop order was the biggest single episode in the company's
history. Nothing in subsequent years was so great and so unexpected."
-Steve Wozniak