Run script on internet connection?

Hi everybody,
I’m wondering how one runs a applescript only after a internet connection has been established?

Please be nice, this is my first post :stuck_out_tongue:


One of many ways: (and welcome, too :slight_smile: )

-- Start the script with
	if count paragraphs in (do shell script "ping -c 1") ≥ 5 then
		exit repeat
		delay 1
	end if
end repeat
-- press on with the rest of your script