set hostname to "google.com"
set retValue to (do shell script ("ping -c1 " & hostname & " >/dev/null; echo $?"))
if retValue is equal to "0" then
display dialog ":-))"
else
display dialog ":-(("
end if
tell application "System Events" to set uTorrentrunning to (name of processes) contains "uTorrent"
if uTorrentrunning is false then
tell application "uTorrent" to activate
end if