TextExpander to calculate CD3 Score?

Hi everyone,

Just started listening to Automators and registered - fair to say Automators has already cost me a fortune (TextExpander, Keyboard Maestro etc.) :smiley:

I’m hoping someone can help me out…I’ve just signed up for TextExpander and I am enjoying getting all my snippets created :slight_smile:

I would like to use Text Expander to generate my CD3 score for tasks which come into my Trello board. In theory, I would use a fill-in form to enter a description, Priority (1000, 100, 50 or 10), Size (estimated duration) and business Owner. Text Expander would then calculate the CD3 by dividing the priority by the size and paste them in a nice list like the following:


Priority: 1000 (entered via fill-in)
Size: 10 (entered via fill-in)
CD3: 100 (calculated by TextExpander)
Business Owner: Jamie Grant (entered via fill-in)

I have never scripted using AppleScript or JavaScript and wondered if someone could point me in the right direction?

Many thanks,


1 Like

Hi Jamie

Since you mentioned Keyboard Maestro is in your tool-belt, I felt free to offer a suggestion using it rather than TextExpander:

I think Keyboard Maestro is the right tool for this job because it has all of the pieces built-in, rather than trying to massage the output from TextExpander.

Here’s the macro I came up with:

The steps are pretty straight-forward:

  • The user is asked to choose a Priority from a dropdown list of 1000, 100, 50, or 10 (1,000 is the default)

  • The user is asked to enter a size (default is 10)

  • The user is asked to enter a Business Owner (defaults to Jamie Grant)

(You can change the defaults, of course, or leave them blank if you don’t want a default.)

Keyboard Maestro then calculates Priority divided by Size and outputs everything like so:

Priority:	1000
Size:		10
CD3:		100
Owner:		Jamie Grant

If your tab settings are the same as mine, the values should make a nice little column. Otherwise you’ll want to make changes in the “Insert Text” block. (There are tabs in there already.)

You can download the macro here (if it displays in your browser instead of downloading, click the “Back” button and then do a right/control-click and ‘Save As…’).

I’ll be happy to try to answer any questions you might have.

1 Like

Wow - thank you so much!! I have switched over to use Keyboard Maestro for doing this and thanks to your script, it’s working perfectly!

Text Expander and Keyboard Maestro is a seriously powerful combination!


1 Like

Here’s how it can be done in TextExpander.


Gives this…


… with this set-up …

… that utilises this script.



let intPriority = %fillpopup:name=Priority:default=1000:100:50:10%;
TextExpander.appendOutput("Priority: " + intPriority + "\n");

let intSize = %filltext:name=Size:default=10%;
TextExpander.appendOutput("Size: " + intSize + "\n");

TextExpander.appendOutput("CD3: " + (intPriority / intSize) + "\n");

TextExpander.appendOutput("Business Owner: %filltext:name=Business Owner:default=Jamie Grant%");

Hope that helps.

This is brilliant - massive thanks to you too!

works like a charm!! I use a combination of mac (for home and business use) and PC for my day job - this works a treat on both…thank you!