• 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: Lion crashed by AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lion crashed by AppleScript


  • Subject: Re: Lion crashed by AppleScript
  • From: Luther Fuller <email@hidden>
  • Date: Sun, 24 Jul 2011 13:47:55 -0500

On Jul 24, 2011, at 1:23 PM, Axel Luttgens wrote:

Le 24 juil. 2011 à 19:42, Luther Fuller a écrit :

Yesterday afternoon, I was convinced that I understood this problem and that writing a new key to a prefs file was not the cause of this problem. I was merely confused!

Just to be sure ...
I reinstalled Lion on my test partition and ran a simplified version of my Abracapocus script.
The problem appears instantly.

And, just to be very sure ...
I reinstalled Lion on my test partition, again, and ran the script, again.
Again, he problem appears instantly.

Hello Luther,

After all those iterations, what exactly does your "simplified version" of your Abracapocus script look like?

The original Abracapocus used idle and quit handlers. I removed these. I just submitted Bug # 9831083 with the following test script ...

on run
display dialog "Set invisibles to …" buttons {"Cancel", "Show", "Hide"} default button 3
button returned of the result
if the result = "Show" then
my toggleInvisibles(true)
else if the result = "Hide" then
my toggleInvisibles(false)
end if
end run -----------------------------------------

on toggleInvisibles(show)
tell application "Finder"
(path to preferences folder from user domain) as text
set filePath to the result & "com.apple.finder.plist"
quit
end tell
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
delay 1
try
set value of property list item "AppleShowAllFiles" of property list file filePath to show
-- this line fails if the "AppleShowAllFiles" key is not present in a new prefs file.
on error
-- causing this to run.
try
value of property list file filePath
the result & {|AppleShowAllFiles|:show}
set value of property list file filePath to the result
-- this successfully adds 'AppleShowAllFiles' to
-- the preference file "com.apple.finder.plist"
-- and Finder immediately becomes inoperative.
end try
end try
delay 1
end tell
tell application "Finder" to activate
end toggleInvisibles -----------------------------

On a new Lion installation, it kills the Finder, first time, every time.
I will let Apple figure out why.

 _______________________________________________
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

  • Follow-Ups:
    • Re: Lion crashed by AppleScript
      • From: Axel Luttgens <email@hidden>
References: 
 >Re: Lion crashed by AppleScript (From: Shane Stanley <email@hidden>)
 >Re: Lion crashed by AppleScript (From: Luther Fuller <email@hidden>)
 >Re: Lion crashed by AppleScript (From: KOENIG Yvan <email@hidden>)
 >Re: Lion crashed by AppleScript (From: Christopher Stone <email@hidden>)
 >Re: Lion crashed by AppleScript (From: Christopher Stone <email@hidden>)
 >Re: Lion crashed by AppleScript (From: Luther Fuller <email@hidden>)
 >Re: Lion crashed by AppleScript (From: Axel Luttgens <email@hidden>)

  • Prev by Date: Re: Lion crashed by AppleScript
  • Next by Date: Re: Lion Sucks?
  • Previous by thread: Re: Lion crashed by AppleScript
  • Next by thread: Re: Lion crashed by AppleScript
  • Index(es):
    • Date
    • Thread