Dashboard script needs some help
Dashboard script needs some help
- Subject: Dashboard script needs some help
- From: email@hidden
- Date: Thu, 22 Jul 2010 11:55:51 -0500
Hello Scripters,
I have a little script that turns Dashboard
on or off. I'm not sure how to set it up correctly so that when a button
is pushed the appropriate action follows. I think I'm close but would really
appreciate any help. Thanks.
display dialog
"Dashboard Control." buttons
{"Cancel", "Disable", "Enable"} default
button 3
if result
is "Disable" then do
shell script "defaults write
com.apple.dashboard mcx-disabled -boolean YES"
do shell script
"killall Dock"
display dialog
"Dashboard has been disabled." buttons
{"OK"}
end
if result
is "Enable" then do
shell script "defaults write
com.apple.dashboard mcx-disabled -boolean NO"
do shell script
"killall Dock"
display dialog
"Dashboard has been enabled." buttons
{"OK"}
end
Jeff Madson • RR Donnelley Desktop
Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden