Many times the text coming from a screen may be same as the variable name used inside the script. e.g.
// A variable storing a value
Let>TEST=123
// TEST a string coming from the screen; we don't have any control over it..!
Let>var=TEST
// Now if I want to display only TEST not 123 What I need to do?
I tried as below:
Let>VAREXPLICIT=1
Mdl>%var%
Let>VAREXPLICIT=0
SCRIPT VARIABLE and SCREEN TEXT COLLISION
Moderators: Dorian (MJT support), JRL
-
- Pro Scripter
- Posts: 63
- Joined: Thu Dec 10, 2009 8:13 am
Hi Niroj@Work,
Your easiest solution might be to use very uncommon variable names... so uncommon that there is almost no chance that the variable name itself will ever be encountered in any text you might assign to it.
Check out the following post for a detailed description of what is going on...
Your easiest solution might be to use very uncommon variable names... so uncommon that there is almost no chance that the variable name itself will ever be encountered in any text you might assign to it.
Check out the following post for a detailed description of what is going on...
- Assigning a variable with percents around it
http://www.mjtnet.com/forum/viewtopic.php?t=3990
jpuziano
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
Hi,
The problem is with the location of the varexplicits. Try this:
Gale
The problem is with the location of the varexplicits. Try this:
Code: Select all
Let>VAREXPLICIT=1
// A variable storing a value
Let>TEST=123
// TEST a string coming from the screen; we don't have any control over it..!
Let>var=TEST
//back to default value for varexplicit, if you wish.
Let>VAREXPLICIT=0
// Now if I want to display only TEST not 123 What I need to do?
Note how the variable expansions work in these cases:
Mdl>%var%
mdl>var
mdl>%TEST%
mdl>TEST
mdl>var:%var%
mdl>TEST:%TEST%