On Jul 26, 2015, at 11:53, Robert Poland <email@hidden> wrote: Has anyone found a way to make the selected fonts in Applescript to not keep reverting to the default.
I goto Script Editor Preferences/Formatting, select all the fonts and with the Show Fonts set the font size to 18.
Then soon after they all revert to the default (12).
______________________________________________________________________
Hey Bob,
We've had that conversation several times. Put the info in your troubleshooting file. :)
------------------------------------------------------------------------------------------- # TASK: REVEAL APPLESCRIPT FONT FILE # TAGS: @REVEAL, @APPLESCRIPT, @FONT, @FILE ------------------------------------------------------------------------------------------- set AppleScriptFontFile to "~/Library/Preferences/com.apple.applescript.plist"
tell application "System Events" to set AppleScriptFontFile to POSIX path of disk item AppleScriptFontFile set AppleScriptFontFile to alias POSIX file AppleScriptFontFile
tell application "Finder" activate reveal AppleScriptFontFile end tell -------------------------------------------------------------------------------------------
My AppleScript fonts have gotten fried a number of times over the years but not frequently. It pissed me off and prompted me to write a Bash function to back up the com.apple.applescript.plist file.
I posted that back in 2011.
Nigel Garvey mentions locking his com.apple.applescript.plist in 2011:
More recently Emmanuel showed us how to script it easily from Smile:
Get your fonts the way you want them.
Run this in Smile to get the full record of font-formats:
Replace the record in Emmanuel's script and run it if/when you need to restore them.
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).
Make certain that you didn't ALREADY lock your com.apple.applescript.plist file. If it is already locked then the changes you make aren't going to stick.
-- Best Regards, Chris
|