• 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: Script fonts?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Script fonts?


  • Subject: Re: Script fonts?
  • From: Christopher Stone <email@hidden>
  • Date: Sun, 26 Jul 2015 22:50:28 -0500

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.

http://lists.apple.com/archives/applescript-users/2011/Oct/msg00244.html

Nigel Garvey mentions locking his com.apple.applescript.plist in 2011:

http://lists.apple.com/archives/applescript-users/2011/Dec/msg00132.html

More recently Emmanuel showed us how to script it easily from Smile:

http://lists.apple.com/archives/applescript-users/2014/Nov/msg00039.html

Get your fonts the way you want them.

Run this in Smile to get the full record of font-formats:

ASFormats

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

 _______________________________________________
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: Script fonts?
      • From: Shane Stanley <email@hidden>
References: 
 >Script fonts? (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: Copy ONLY the from "email address" from the current selected apple mail email Following
  • Next by Date: Re: Script fonts?
  • Previous by thread: Re: Script fonts?
  • Next by thread: Re: Script fonts?
  • Index(es):
    • Date
    • Thread