Re: Simple script used to work, not now
Re: Simple script used to work, not now
- Subject: Re: Simple script used to work, not now
- From: Lists <email@hidden>
- Date: Mon, 26 Nov 2012 19:42:50 -0800
On Nov 26, 2012, at 5:22 PM, Dave C <email@hidden> 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 AS Editor and run it there. It seems to hang up at the end when activating the previously-quit Finder:
>
> "Finder got an error: Connection is invalid." number -609
>
> Ideas?
>
> Thanks,
> Dave
>
> - - -
>
> set dotVisible to do shell script "defaults read com.apple.Finder AppleShowAllFiles"
> if dotVisible = "0" then
> do shell script "defaults write com.apple.Finder AppleShowAllFiles 1"
> else
> do shell script "defaults write com.apple.Finder AppleShowAllFiles 0"
> end if
> tell application "Finder" to quit
> delay 1
> tell application "Finder" to activate
>
> - - -
I tried this (I'm on 10.8) and it works. I'm pretty sure I used it under 10.6 as well
do shell script "defaults write com.apple.finder AppleShowAllFiles -bool YES"
do shell script "killall Finder"
or
do shell script "defaults write com.apple.finder AppleShowAllFiles -bool NO"
do shell script "killall Finder"
_______________________________________________
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