Please enable JavaScript to view this site.


The result variable sRESULT is used to pass a string, as the result of a macro, to the current script's macros resulting actions.


Suppose you wanted a macro token which displayed the number of days until Christmas (somewhat like the [t-] token), you would write code like this.

nDateXmas = EncodeDate(YearOf(n_TokenDate),12,25)
nDaysToXmas = nDateXmas - n_TokenDate
sRESULT = IntToStr(nDaysToXmas)

And then, in the script's macros options resulting actions dialog, you would set the text replacement actions to Replace token with sRESULT, as shown below.



If you do not set a value for sRESULT, it is assumed to be blank.


See also: macros resulting actions.


Topic 105118, last updated on 19-Apr-2020