• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: testing internet connection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >testing internet connection (From: Ingo Bitsch <email@hidden>)

  • Prev by Date: Re: Scripting import of media into FileMaker Pro container fields
  • Next by Date: Re: scripting submitting a form
  • Previous by thread: testing internet connection
  • Next by thread: Re: Problems using Tanaka's osax (email@hidden)
  • Index(es):
    • Date
    • Thread