connnected?!
connnected?!
- Subject: connnected?!
- From: Patrick Mast <email@hidden>
- Date: Tue, 7 Oct 2003 21:10:49 +0200
Hi:
i am writing a smal script that is updating a internetsite whenever i
go online.
i am using a stay-open script that's sending a ping to a url every 5
seconds. when no error returns i am generating and uploading the new
page.
but i am not very happy with the ping-solution. i got the impression
that the ping command sometimes returns an error when i am online and
sets an internal variable to offline. with the next next ping without
error the scripts thinks i am online again, so the script will be
excecuted again.
is there any reliable alternative to the ping-test? i am nearly sure
there is...
here is my script:
property statusOnline : false
on idle
try
do shell script "ping -c 1 'www.apple.com'"
if statusOnline is false then
set statusOnline to true
--do action
end if
on error
if statusOnline is true then
set statusOnline to false
end if
end try
return 5
end idle
regards
patrick
_______________________________________________
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.