• 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
connnected?!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: connnected?!
      • From: Steve Mills <email@hidden>
  • Prev by Date: Re: Copy file names in a folder to text edit?
  • Next by Date: newbie question in Safari
  • Previous by thread: Re: InDesign from QXP Script
  • Next by thread: Re: connnected?!
  • Index(es):
    • Date
    • Thread