Source language: Translate to:

Clear multiple variables

General questions about NeoBook

Moderator: Neosoft Support

Clear multiple variables

Postby StarterPack » Wed Dec 07, 2016 1:25 am

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.
StarterPack
 
Posts: 115
Joined: Fri Feb 19, 2016 6:55 am

Re: Clear multiple variables

Postby Gaev » Wed Dec 07, 2016 6:10 am

StarterPack:

Code: Select all
Loop "1" "100" "[thisTE]"
   SetVar "[TextEntry[thisTE]]" ""
EndLoop
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Clear multiple variables

Postby virger » Wed Dec 07, 2016 6:29 am

In this case is verry simple
Code: Select all
DeleteArray "[TextEntry]" "All"
COSTA RICA
PURA VIDA
User avatar
virger
 
Posts: 510
Joined: Mon Sep 18, 2006 12:21 pm
Location: Costa Rica, America Central

Re: Clear multiple variables

Postby StarterPack » Wed Dec 07, 2016 7:07 am

Thank you Virger
StarterPack
 
Posts: 115
Joined: Fri Feb 19, 2016 6:55 am


Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 1 guest