Hi all
This script should kill and restart Finder after having toggled the visibility
of hidden items:
try
set VIS to ((do shell script "defaults read com.apple.finder
AppleShowAllFiles") as integer) as boolean
on error
set VIS to false
end try
if VIS = true then
do shell script ("defaults write com.apple.finder AppleShowAllFiles
-bool false; killall Finder")
else
do shell script ("defaults write com.apple.finder AppleShowAllFiles
-bool true; killall Finder")
end if
delay 1
tell application "Finder"
activate
end tell
Mostly, it does it correctly, but sometimes, it refuses simply to kill the
Finder. In such instances, I can also try the "do shell script" part directly
in Terminal, but alas: Finder will not be killed neither...
Quitting and restarting Finder manually usually solves the problem, but WHAT or
WHERE is the Problem??
Console does not show any entry about it.
Any ideas?
Rudolf
---------------
System: 10.6.8
Hardware: Mini mid 2011
_______________________________________________
MacOSX-talk mailing list
[email protected]
http://www.omnigroup.com/mailman/listinfo/macosx-talk