Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A Service to hide/show the Desktop' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A Service to hide/show the Desktop
Authored by: mr. applescript on Aug 05, '10 09:19:00AM
Place the initial query in a try block and if an error occurs because no prefs key is present, create one. Also, tell the Finder to quit instead of killing it:
try
	set myAnswer to ((do shell script "defaults read com.apple.finder CreateDesktop") as integer) as boolean
on error error_message number error_number
	do shell script "defaults write com.apple.finder CreateDesktop 1"
	set myAnswer to true
end try
do shell script "defaults write com.apple.finder CreateDesktop " & (((not myAnswer) as integer) as string)
tell application "Finder" to quit
delay 3
tell application "Finder" to launch


[ Reply to This | # ]
A Service to hide/show the Desktop
Authored by: llee on Aug 05, '10 10:43:38AM

This is the one, everybody! Thanks.



[ Reply to This | # ]