Mailsmith
Other Programs
Scripts
Mailsmith.scpt
Archive to sub-mailbox
Check Spelling
Find reply
Change font size
Submit Script to JEM
Fix common spelling errors
Setting SMTP server
URL from Safari
Address from AB
linkMunge
Export to Address Book
Saving attachments
Digest Script
File with same
POP window position
Position of new windows
iCal and Mailsmith
Edit From Line
Modified Thread Script
Reply to Selection
Temporary Text Window
Compact gain
Tracking backups
Edit subject
Googler
Auto-rewrap
MMA
SMTP server
Open, fetch, and close
URL Manager
BrainForest
Thread by Author
Thread by subject
Export Email
Get Selection
Read Addresses
Export Email
Organize Email
Account setup
Mailsmith 2 BBEdit
BBEdit 2 Mailsmith
Search II
Check One
Delete Enclosure
Open, fetch, close
Set Answered
Set Redirected
Empty Trash
List found
Print Several
Del. old. msg.
Delete Enclosures
Accounts
Address Book
Editing
Filters
General
Import/Export
Links
Mailboxes
Memory
Scripting
Speed
send/receive
Tips/Tricks


Increase/decrease font size

Author Charlie Garrison
Last modified 2003-05-12
What is this?

These are two scripts to increase and decrease the font size of the front window. Depending on the layout and length of some messages, I prefer to view them using a larger font. These scripts will cycle (up or down) through a preset list of font sizes. Script will beep if the largest (or smallest) size from the list has already been set.

I have set the keystroke shortcut to Cmd-shift-minus and Cmd-shift-plus; you may want to do the same.

I am not sure if the script works with all window types. I have tested it with Mail Browser, Mailbox, and Message windows.

I have set the list to font sizes {7, 9, 12, 14, 18}. You should change the fontSizes property to the list of sizes that work well with your default font.

I also included a simple (one line) script for setting a specific font size.


--Set Font larger;  set key to cmd-shift-plus

property fontSizes : {7, 9, 12, 14, 18}
tell application "Mailsmith"
    set fontSize to display font size of window 1
    set fontCnt to length of fontSizes
    set fontChanged to false
    repeat with i from 1 to fontCnt
        if fontSize = item i of fontSizes then
            if i = fontCnt then
                beep
            else
                set display font size of window 1 to item (i + 1) of fontSizes
            end if
            set fontChanged to true
            exit repeat
        end if
    end repeat
    if not fontChanged then set display font size of window 1 to ¬
        item 1 of fontSizes
end tell

--------------------------------------

--Set Font smaller;  set key to cmd-shift-minus

property fontSizes : {7, 9, 12, 14, 18}
tell application "Mailsmith"
    set fontSize to display font size of window 1
    set fontCnt to length of fontSizes
    set fontChanged to false
    repeat with i from fontCnt to 1 by -1
        if fontSize = item i of fontSizes then
            if i = 1 then
                beep
            else
                set display font size of window 1 to item (i - 1) of fontSizes
            end if
            set fontChanged to true
            exit repeat
        end if
    end repeat
    if not fontChanged then set display font size of window 1 to ¬
        item fontCnt of fontSizes
end tell

--------------------------------------

--Set Font 9pt
tell application "Mailsmith" to ¬
    set display font size of window 1 to 9