Was searching for something else when I stumbled upon this thread again, and realised that what was proposed by @peternlewis in post #36 can be done allot simpler — also using a For Each, set up like this:
Set Multiple Variables To Separate Values — Using For Each.kmmacros (16 KB)
(v11.0.2)
This approach might only work with KM11, as this was the version where it became possible to use variable array syntax directly within the Set Variable to Text variable field. But as it is not here directly setting a variable array element, only pointing towards the variable name from another variables array, it might also work for versions prior to KM11 as well.
As text fields, or text lines, themselves wont get affected by the %Delete%
token, this approach also works for deleting all listet variables, like this:
All though setting multiple variables, all to the same value, can be done even simpler, like this:
Delete All Listed Variables — Using For Each.kmmacros (18 KB)
(v11.0.2)
EDIT: And heres a similar approach to deleting multiple global variables, only here done through a subroutine:
Delete Multiple Global Variables CALLER.kmmacros (17 KB)
Set Multiple Variables- All to Same Value SUBROUTINE.kmmacros (16 KB)
(v11.0.2)
Using this same subroutine for setting variables of course only works for global and instance variables.