Page 1 of 1

Clear multiple variables

PostPosted: Wed Dec 07, 2016 1:25 am
by StarterPack
Hi Guys

I want to clear multiple variables at once. I have 100 "TextEntry"s and if I want to clear them all, i can use the script

SetVar "[TextEntry1]" ''
SetVar "[TextEntry2]" ''
SetVar "[TextEntry3]" ''
SetVar "[TextEntry4]" ''
SetVar "[TextEntry5]" ''

till SetVar "[TextEntry100]" ''

This is too many script.

How can I clear all with much less script.

Re: Clear multiple variables

PostPosted: Wed Dec 07, 2016 6:10 am
by Gaev
StarterPack:

Code: Select all
Loop "1" "100" "[thisTE]"
   SetVar "[TextEntry[thisTE]]" ""
EndLoop

Re: Clear multiple variables

PostPosted: Wed Dec 07, 2016 6:29 am
by virger
In this case is verry simple
Code: Select all
DeleteArray "[TextEntry]" "All"

Re: Clear multiple variables

PostPosted: Wed Dec 07, 2016 7:07 am
by StarterPack
Thank you Virger