Just started listening to Automators and registered - fair to say Automators has already cost me a fortune (TextExpander, Keyboard Maestro etc.)
I’m hoping someone can help me out…I’ve just signed up for TextExpander and I am enjoying getting all my snippets created
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:
{Description}
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?
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.
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.
Hello!
To start with, thank you @sylumer for your excellent advice and very useful help on several places on this forum!! There are many instances where your help solved an issue I was facing, both regarding shortcuts and TextExpander!
Now I am facing a challenge that I unfortunately am not able to solve, however. I also use one of your other scripts for TextExpander for calculation (Calculate (BASH)), but I am not that familiar with JavaScript (yet) so I do not know how to adapt the script mentioned in this post on calculation of CD3 score.
I am a teacher in law and am trying to figure out how to summarise the points to an exam directly in TextExpander, see below. We are using a very simple learning plattform and the points have to be written in plain text, otherwise we would use Numbers or Excel.
Questions 1-8: <fill in> points
Question 9: <fill in> points
Question 10: <fill in> points
Question 11: <fill in> points
Question 12: <fill in> points
Total points: *here I would need the sum for questions 1-12 fill ins*
I hope there is an easy way to adjust your script? I just don’t know how
Thank you in advance for any advice you might be able to provide!
We’ll take the filltop to make things look pretty.
%filltop%
We can then take the size field and replicate it a dozen times with a bit of rewording and by default, set some unique values purely to show the calculation’s working when you test it.
let intSize = %filltext:name=Size:default=10%;
TextExpander.appendOutput("Size: " + intSize + "\n");
Then use the same principle used for the CD3 calculation line.
As an aside, I would suggest posting as a new topic next time and just linking back to a previous topic if one is relevant. This one’s coming up on it’s first anniversary
Thank you soo much!!! WOW! I will be able to use this in so many instances, especially with your very useful explanations too! I am starting to see the places I can adapt and I will definitely start the JavaScript course that I got on Udemy, it seems it is a very powerful language!
I will also create a new thread next time. I have been following the forum since the podcast started but am quite new with the posting