Kill or Start Dashboard (Tiger)

The Dashboard uses up cycles and memory, so if you are not a frequent user of its charms, you might like to turn it off. I found a Terminal script on MacOSXHints.Com that can be run as an AppleScript:

set SwitchDashboard to display dialog "Change State of Dashboard?" buttons {"Off", "On"} default button "Off"
if SwitchDashboard = "Off" then
	do shell script "defaults write com.apple.dashboard mcx-disabled -boolean YES; killall Dock"
else
	do shell script "defaults write com.apple.dashboard mcx-disabled -boolean NO; killall Dock"
end if

After it runs, the Dashboard is still in the dock and shows that it is running, but it’s not according to the Activity Monitor. The Dock will cycle off and on again, and you can pull the Dashboard out of it if you want to.

Thx for the script! I made some minor changes to it.

-- by Adam Bell 
-- http://macscripter.net/viewtopic.php?id=14109
-- with some little adaptions by Ptujec

tell me to activate
set SwitchDashboard to display dialog "Change State of Dashboard?" buttons {"Cancel", "Off", "On"} default button "Off" with title "Toggle Dashboard" with icon (POSIX file "/Applications/Dashboard.app/Contents/Resources/Dashboard.icns")

if button returned of result is "Off" then
	do shell script "defaults write com.apple.dashboard mcx-disabled -boolean YES"
else if button returned of result is "On" then
	do shell script "defaults write com.apple.dashboard mcx-disabled -boolean NO"
end if

quit application "Dock"