A couple of TextExpander thingies

I sent out a bill to a client the other day and decided I wanted to start putting the due date for my invoices in the body text of the emails they’re attached to. The due date is on the invoice itself, of course, but I figured an extra reminder wouldn’t hurt.

And being me, I didn’t want to add the due date by hand. I wanted it added automatically.

I already had a simple TextExpander snippet for my billing emails, made shortly after TextExpander 3 added fill-in-the-blank fields. I was afraid I’d have to abandon that one and write a script that would add a net 30 due date. I had somehow missed that TextExpander has had just the sort of date and time math I need since version 2.5. That made the changes to the old snippet trivial.

TextExpander billing snippet

The content is

Attached is Company Name invoice %fill:invoice% for $%fill:amount%, covering recent services on the above-referenced project. Payment is due %@+30D%B %e, %Y.

Thank you for using Company. Please call if you have any questions or need further information.

The date math and formatting are handled by the

%@+30D%B %e, %Y

code at the end of the first paragraph. Choosing Date/Time Math > Add Day(s) from TextExpander’s insert menu,

Date/Time Math in TextExpander

inserts %@+1D into the Content area. Change the 1 to however many days you want (30 for me) and then insert the usual date codes after the D. %B %e, %Y yields the month name, the day without a leading zero, and the four-digit year: July 15, 2011, for example. Much simpler than I thought it would be.

While I’m dispensing simple TextExpander snippets, I might as well make available my set of Mac keyboard symbol snippets. If you ever have to write down instructions on how to use a Mac, these make it easy to describe keyboard shortcuts. They’re distinctly faster than scrolling through the Character Viewer.

To insert Type Key name
;cmd Command
;opt Option
;shift Shift
;ctl Control
;tab Tab
;bs Backspace
;del Forward
;enter Enter
;return Return
;esc Escape
;apple Apple
;left Left Arrow
;right Right Arrow
;up Up Arrow
;down Down Arrow
;space Space

That last one’s meant for the  menu, not as a synonym for the ⌘ key. Only uncouth arrivistes to the Mac platform refer to “the Apple key.”

Update 6/17/11
I just added the five snippets after the  to the Keyboard library at the suggestion of Lri in the comments.

I’m sure you can get snippets like this from many sources; the one advantage of downloading mine is that they aren’t bundled with a lot of other snippets you may not want.

By the way, if you don’t like the semicolon prefix I use in my snippets (even though you should), you can change them all in one fell swoop by using my little teprefix script.