On Nov 26, 2012, at 7:22 PM, Dave C wrote: I used this script successfully under 10.6.8 for more than a year. Now I bought a new hard drive, installed 10.6.8 onto it, and am in the process of moving over everything to the new drive.
I run this script (it toggles all Finder files between visible and invisible) and this time it freezes up. I open the
I have a similar script which I have been using for some time, including Snow Leopard and Lion. It still works correctly in Lion (I just checked). Here is a handler from that script so you can see some details ...
on showInvisibles() tell application "Finder" (path to preferences folder from user domain) as text set filePath to the result & "com.apple.finder.plist" quit end tell -- delay 1 tell application "System Events" repeat -- until not (exists application process "Finder") delay 0.1 if not (exists application process "Finder") then exit repeat end repeat try set value of property list item "AppleShowAllFiles" of property list file filePath to (true) on error try (value of property list file filePath) & {|AppleShowAllFiles|:true} set value of property list file filePath to the result end try end try end tell tell application "Finder" to activate end showInvisibles -----------------------------
Now for the bad news … It FAILS IN MT. LION. There is no error message, it just does not do anything. I opened the file "com.apple.finder.plist" but could not find the property list item "AppleShowAllFiles" .
Why can't this handler write the preference file? !!!!!!!!!!!!!!!!!!!!!!
|