When I tried this I got an error message whose second half referred to something about how you couldn’t use substitutions that refer to temporary values in a context like this, because the temporary values might be gone by the time you need to refer to them. It seems to me that using “the substituted form” should take care of that, because that ensures that you don’t actually need to refer to the temporary value, but I guess the compiler can’t figure that out at compile time. (See §20.7 on “substituted form.”)
Anyway, this means that if we really want to work around it in this way, we can use a global variable:
The global workaround is a text that varies.
To substitute (t - a text):
if the computer is touchable:
say "(typing)[line break]";
now the global workaround is "[t]";
try typing "[global workaround]".
(I think you don’t have to set the global workaround to the substituted form of “[t]” because when you set a text global to something that refers to a temporary variable, it automatically substitutes–again see §20.7.)
This is obviously less than ideal. I would say that if you really want to do something like this, the thing to do would probably be to put the work of the typing action in a phrase like “To type (t - a text)…” that you could call from elsewhere, and have the carry out typing rule call that phrase with “[the topic understood]”.
But again, when you’re trying to do something fancy with text, and there are only a few valid text strings that really make sense, it’s often much easier to make them into a kind of value–those can be passed between routines easily.