Testing for a Modem Connection
Testing for a Modem Connection
- Subject: Testing for a Modem Connection
- From: Carl Anderson <email@hidden>
- Date: Tue, 17 Dec 2002 19:34:39 -0800 (PST)
I wrote this script to connect with the internet
automaticly. However, occasionally, the clock on my
modem does not start when it connects causing the
program to hang. Is there a better test than the one I
am using?
property duration : 0
property anywhere : "5551212"
property somewhere : "KL 3-2654"
property nowhere : ""
property address : ""
property input : ""
say "Click One for Choice One and Two for choice Two"
display dialog ,
"What is your desire?" buttons {"One", "Two",
"Cancel"}
if result is not equal to {button returned:"Cancel"}
then
set input to result
tell application "Internet Connect"
repeat
try
connect to telephone number anywhere
set duration to seconds connected of status of
current configuration
if duration is greater than 0 then
exit repeat
end if
on error
set nowhere to somewhere
set somewhere to anywhere
set anywhere to nowhere
end try
end repeat
end tell
if input is {button returned:"One"} then
--do something
else if input is {button returned:"Two"} then
--do something else
end if
end if
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.