Any time the user types zpi, it will expand to: 3.14159265.
Here is a more complex example. It's a TextExpander fill-in snippet which tells the user their zodiac sign:
zodiacSigns = ['monkey', 'rooster', 'dog', 'pig', 'rat', 'ox', 'tiger', 'rabbit', 'dragon', 'snake', 'horse', 'goat']; var index = %filltext:name=Enter your birth year:default=1984% % 12; "Your Zodiac sign is the " + zodiacSigns[index] + ".\n"; // %filltop%
When expanded, the user is prompted for their birth date, and the snippet returns their zodiac sign. For example, if the user enters 1972, the snippet expands to “Your Zodiac sign is the rat.”
Did you notice %filltop%? That tells TextExpander to duplicate any single line and popup fields at the top of the fill-in window and hide the script. You'll find that via the insert menu under Fill-ins > Show at top.