=\, though the abbreviation can be whatever you want.
Now paste in the following content:
%filltop% "" + (%filltext:name=calculation:width=40%) ;
Here’s what it looks like in TextExpander’s snippet editor:
Now, with your complete snippet, give it a try.
Type the abbreviation
=\ in whichever app you like for your typing. A form for entering your calculation will pop up. To add 2 plus 2 in the form type, 2 + 2. Here’s what that would look like:
Press OK, and 4 will appear where you typed your abbreviation!
How does it work?
If you want to learn more about scripting in TextExpander, check out the Scripts section of our Tips page.