One of the great, unique features of FontAgent Pro for Macintosh is its ability to automate font management tasks using AppleScript. On the right side of the FontAgent Pro menubar is a script icon that lists scripts that ship with FontAgent Pro as well as those you add yourself.
The scripts that come with FontAgent Pro work directly with FontAgent Pro, but you can add scripts that run other applications as well.
Below is a script that launches Smasher, Insider’s font and cache maintenance utility. If you would like to download the script click here. Unzip the attached file and place the script in the /Library/Application Support/FontAgent Pro/Scripts/ folder to get it to appear as Launch Smasher in the FontAgent Pro > Scripts menu.
set appFolder to (path to applications folder as Unicode text)
set afolder to appFolder & “Smasher”
tell application “Finder”
if exists folder afolder then
try
tell application “Smasher”
activate
end tell
end try
else
tell application “Finder”
activate
display dialog “You do not have Smasher installed. To learn more about Smasher and download a demo click \”Learn More.\”" buttons {“Cancel“, “Learn More“} default button 2
if the button returned of the result is “Learn More” then
set theURL to “open http://www.insidersoftware.com/SM.php”
do shell script theURL
else
– nothing happens
end if
end tell
end if
end tell
Note: If you copy and paste the text into Script Editor, depending on the browser you are using, you may need to do a find-and-replace on the quotes to get them to be dumb quotes. ScriptEditor will see a smart quote as an unknown token and the script will not compile. You can view and edit the linked script after you download it if you wish.
This script is handy because when you start seeing symptoms of font cache corruption, it allows you to quickly launch Smasher from FontAgent Pro, where you can clear your caches and get back to your work. It is also a good idea to make sure you have Smasher’s cache clearing scheduled to run each time you start or shutdown your Mac.
When you run the script, Smasher launches and you can edit settings to clear your caches in any manner you wish. If you don’t have Smasher installed it gives you an option to go to a web page where you can learn more about the product.

This script is offered as is and you may feel free to edit it in any way you wish. For example, you add scripts that launch other applications such as QuarkXPress or InDesign from within FontAgent Pro.
In future posts, we will talk more about using AppleScript to automate font-related workflows. Stay tuned to The Inside Scoop.






