Toggle Web Sharing with an AppleScript

As mentioned in this hint, Mountain Lion removed the setting in the Sharing preference pane to turn Web Sharing on and off, even though Apache Web Server is still installed by default. That hint also mentions a third-party preference pane that you can install to toggle Web Sharing in Mountain Lion.

Here’s another solution in the form of an AppleScript. If you copy the script to a .scpt file in ~/Library/Scripts, you can conveniently toggle Web Sharing by selecting the script in the Scripts menu.

Here’s the AppleScript:

display dialog "Enter your password:" with title "AppleScript" ¬
	default answer "" with hidden answer
set pw to text return ...





Add to digg
Add to Reddit
Add to Slashdot
Email this Article
Add to StumbleUpon



via MacOSXHints.com http://feeds.macosxhints.com/click.phdo?i=458818354f129578411346499b0c0ab3