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: Iurista GmbH <email@hidden>
- Date: Tue, 27 Nov 2012 13:50:38 +0100
The other thing could be: there's maybe not yet an entry named "AppleShowAllFiles" in "com.apple.Finder" (because of new install). That would mean, you have to make sure in your script, that there is one such entry by adding the following to the beginning of your code
try
do shell script "defaults read com.apple.finder AppleShowAllFiles"
on error
do shell script "defaults write com.apple.finder AppleShowAllFiles -bool true"
end try
if (do shell script "defaults read com.apple.finder AppleShowAllFiles") = "TRUE" then
do shell script "defaults write com.apple.finder AppleShowAllFiles FALSE; killall Finder"
else
do shell script "defaults write com.apple.finder AppleShowAllFiles TRUE; killall Finder"
end if
Am 27.11.2012 um 02.22 schrieb Dave C:
> 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
>
> - - -
>
> 2011 Mini 2.7 GHz dual i7 / 16 GB / 250 GB & 750 GB
> OS X 10.6.8 Snow Leopard
>
> _______________________________________________
> 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
_______________________________________________
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