Nested Tokens ? (e.g. WindowFrame for Nth window)

Is there a syntax for nesting tokens ?

Where dimensions of the 3rd window are found by evaluating:

%WindowFrame%3%

Can we replace the ‘3’ with any kind of calculation or variable expression ?

Ah ! Forgive me ... being slow.

(and looking at my macros, I see that I have done this often before. Mundus senescit)

Yes, that part is a calculation, so you can have anything that a calculation can have in it (except a percent character, unless it is within a bracket pair).

Note that as of 8.0.4, you can also add a subscript to select an individual field, but it has to go after the WindowFrame token name, eg:

%WindowFrame[2]%INDEX%

The value in the square brackets can also be a calculation, so:

%WindowFrame[2*1]%INDEX*1%
3 Likes