Re: Script fonts?
Re: Script fonts?
- Subject: Re: Script fonts?
- From: Shane Stanley <email@hidden>
- Date: Mon, 27 Jul 2015 14:21:00 +1000
On 27 Jul 2015, at 1:50 pm, Christopher Stone <email@hidden> wrote:
We've had that conversation several times.
We certainly have. You left off Nigel's answer from November last year:
Hi Robert.
AppleScript font and colour preferences are stored in ~/Library/Preferences/com.apple.applescript.plist.
I found in Snow Leopard that this file kept getting overwritten with the default formats, so I got into the habit of keeping it locked. This did the trick, except during a couple of system upgrades, when new categories of formatting were added and the file was overwritten anyway.
Occasionally in Mavericks and Yosemite, I've opened (Apple)Script Editor and found that the AppleScript formatting has reverted to the defaults despite the locked file. I've not been able to pin down the cause. My com.apple.applescript.plist file, however, has _not_ been overwritten and restarting the machine has caused the file to be reread and my own format preferences to be restored.
Just recently, I've come up with this stupid-looking script, which saves having to restart the computer. It does a defaults read of com.apple.applescript and a defaults write with the result!
do shell script "asprefs=$(defaults read com.apple.applescript) ; defaults write com.apple.applescript \"$asprefs\""
You have to reopen your editor after running the script to see the restored formatting — assuming of course that the problem on your machine is the same as on mine!
Note that that was a reply to Robert Poland... Since Apple changed the way preference files are cached and written I've found it good practice to quit and restart the application I used to manually change AppleScript fonts after completing my changes.
That may seem like voodoo, but I've had at least 3 instances where my changes reverted shortly after I made them (not unlike what you describe) — and the quit/restart trick stopped that (untested with Yosemite).
FWIW, the change is only really in how long they may be cached. And that's not so much voodoo as expected behavior: changing an app's prefs file while it's running is never guaranteed to work.
|
_______________________________________________
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