Re: Ping Script
Re: Ping Script
- Subject: Re: Ping Script
- From: 2551phil <email@hidden>
- Date: Tue, 26 Mar 2013 09:32:45 +0700
On 26 Mar 2013, at 11:41, Porter Slice < email@hidden> wrote: It works the first time, but I want the script to continually run and listen for that ip address
Then you'll need to write a launch deamon for it. See here for an easy tutorial:
without annoying me by welcoming me home every ten seconds.
Define some property with the value "0". Put an if test at the beginning of the repeat loop that says if the value is 1 then exit (don't do the rest of the loop), if the value is 0 do the rest of the loop. After the ping test, make sure you set that property to 1 when the ping is successful (and exit) or sets it to 0 ( and repeat) if it's not.
On success, the repeat loop will stop, but the script will run again according to the interval you define in the 'StartInterval' key of the launchd plist.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
References: | |
| >Ping Script (From: Porter Slice <email@hidden>) |