Re: Toggle invisible files
Re: Toggle invisible files
- Subject: Re: Toggle invisible files
- From: Shane Stanley <email@hidden>
- Date: Thu, 10 Nov 2016 14:16:40 +1100
On 10 Nov. 2016, at 6:43 am, DaveC <email@hidden> wrote:
Same error as before:
error "2016-11-09 10:45:33.754 defaults[648:d07] The domain/default pair of (com.apple.Finder, AppleShowAllFiles) does not exist" number 1
As Phil said, you need a try block:
try set dotVisible to do shell script "defaults read com.apple.Finder AppleShowAllFiles" on error set dotVisible to false end try if dotVisible as boolean 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
|
_______________________________________________
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