This sounds remarkably like a homework assignment to me...
I'm guessing something like this covers most of your points.
property theAddress : "10.32.8.151"
set missedPings to 0 -- initialize the counter
do shell script "/sbin/ping -c 1 -t 1 " & theAddress
set missedPings to missedPings + 1
if missedPings = 6 then
tell me to quit
do shell script "/usr/sbin/traceroute " & theAddress & " &> " & quoted form of POSIX path of ((path to desktop as text) & "tracereport.txt") & " &"
do shell script "/bin/echo 'Network missed 6 pings' | /usr/bin/mail -s 'Network down' firstname.lastname@example.org"
display alert "Oops. Network failure" giving up after 5
Currently Being ModeratedSep 22, 2011 9:21 AM (in response to mcraig55)
Life lesson: next time, think it through yourself before passing the buck. That way the grade might count for something.
Sure, there's something to be said for knowing when to ask for help, but having a stab at it first will serve you better in the long run.
Currently Being ModeratedApr 19, 2012 2:23 PM (in response to Camelot)
Hey Camelot! This is great. I couldn't write this myself because I'm not very familiar with AppleScript. But I can alter your script a little to suit my needs. This is great.
I've been trying to figure out a solution to a problem like this for days! Thanks!!!
( You were awfully nice to write the script in the first place, considering how it was asked for. )