Script to disconnect me from internet, for set periods?

Hi,

I’m a screenwriter, who has a tendency to get distracted when writing. I’d like a way to shut off my access to the internet for certain hours of the day - say 10am - 1pm. Is there a script I could use to do this? (If so, could you please explain in detail how I’d go about installing, running, etc? I apologize for being a complete and utter newby.)

Many thanks, Tim

This method is pretty extreme and rather CPU intensive, but I had fun with it. It will need modification for OS X… and is not recommended for the feint of heart. Someone else will surely come up with a more practical reply.

Make the script below a run-only, stay open application and - if you know how - make it background-only as well.

Devise a means to ‘bury’ the script, as well as aliases to the offending apps (named exactly as the originals) so deep in a given directory structure as to make it thoroughly annoying to get there.

The result is that the apps aliased in “Forbidden Territory” will quit obediently unless the hour of the day ‘allows’ their use.

Have Fun.

Peter B.


repeat

tell application "Finder"
	
	set the_time to (time of the (current date)) / 3600
	set _processes_ to the name of every process as list
	set not_now to list folder "Macintosh HD:Buried Deep:Forbidden Territory:"

end tell

repeat with no_no in not_now
	
	if no_no is in _processes_ then
		
		if the_time > 10 or the_time < 13 then
			
			tell application no_no
				quit
			end tell
			
		end if
	end if
	
end repeat

end repeat