Text variables were introduced in InDesign CS3. They offer tremendous time-saving and quality-ensuring features which makes sure variable text always has the correct content.
If you have ever needed to insert a lot of variables, you have probably been frustrated that there’s no really quick way to do it. You could assign a keyboard shortcut to each individual variable, but if you have any significant number of variables that you use, this is not a really viable option.
Just select the correct variable (which can be done by keyboard navigation), and it will be inserted into your current text selection.
To make the script even more useful, make sure to assign a keyboard shortcut!efficiency, InDesign, Scripts