Change Rich Text Font
Summary: Changes the font and size for the selected records.
Requires: EagleFiler
Install Location: ~/Library/Scripts/Applications/EagleFiler/
Description
EagleFiler has a preference where you can set the font for new rich text documents. This script lets you change the font of existing documents. Styles such as bold and italic that depend on the font may not be preserved, although there are ways to modify the script to do this (that depend somewhat on the chosen font).
Download in Compiled Format · Download in Text Format
Script
on run
tell application "EagleFiler"
set _records to selected records of browser window 1
repeat with _record in _records
set _filename to _record's filename
if _filename ends with ".rtf" or _filename ends with ".rtfd" then
my changeFont(_record)
end if
end repeat
end tell
end run
on changeFont(_record)
tell application "EagleFiler"
set _file to _record's file
end tell
tell application "TextEdit"
open _file
set font of text of front document to "Helvetica"
set size of text of front document to 13
save front document
close front document
end tell
tell application "EagleFiler"
tell _record to update checksum
end tell
end changeFontLast Modified: 2011-09-23
Running the Script
You can use AppleScript Editor (AppleScript Utility prior to Mac OS X 10.6) to enable Mac OS X’s built-in Script menu. To run the script, just select it from the menu. FastScripts provides a similar menu that supports keyboard shortcuts and other features.