• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Simple script used to work, not now
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 15:49:36 +0100


Am 27.11.2012 um 15.07 schrieb Luther Fuller:

......snip...snip...snip...
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? !!!!!!!!!!!!!!!!!!!!!!

Just because the "AppleShowAllFiles" is not existent by default in "com.apple.finder.plist". 
You have to create it first, as I have written in my mail this afternoon.....

Start your script with this:
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

Rudolf

 _______________________________________________
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

References: 
 >Simple script used to work, not now (From: Dave C <email@hidden>)
 >Re: Simple script used to work, not now (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: Simple script used to work, not now
  • Next by Date: Re: Problem with Archives
  • Previous by thread: Re: Simple script used to work, not now
  • Next by thread: Re: Simple script used to work, not now
  • Index(es):
    • Date
    • Thread