Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 11:04 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Textstring to variable
PostPosted: January 17th, 2010, 5:06 pm 
Offline

Joined: November 5th, 2004, 6:54 am
Posts: 130
Location: Hengelo, The Netherlands
Opus: 8.5/9.0
OS: Windows 7 64-bits, Android 2.1, Android 4.1.2, iOS 7
System: Pentium 7i, 6GB RAM, 750GB HD, DVD-RW (+/-), DV, 3TB EHD, 3D monitor without glasses
A few years ago I used a string to generate variables I could use.

It was something like:

Code:
i=1
VAR + i
this results in a variable VAR1 to use.


But I can't remember how to script this.
Does anyone have an idea?

_________________
Oscar Nijst
ON Education & Consultancy
Hengelo, The Netherlands
OPUS Pro 9.5
Pentium 7i, 16GB RAM, 1 TB HD, DVD-RW (+/-), DV, 3TB EHD, 3D monitor without glasses


Top
 Profile Visit website  
 
 Post subject:
PostPosted: January 17th, 2010, 5:30 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
maybe something like this:
so you would be concatenating a string with a changing value:
Code:
for (i=0; i < somelimit; i++)
{
BuiltupVariable = "myVAR_" + i ;
}


Is that what you had in mind?
I do not remember when or whether 'eval()' command would be needed.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: January 17th, 2010, 6:26 pm 
Offline

Joined: November 5th, 2004, 6:54 am
Posts: 130
Location: Hengelo, The Netherlands
Opus: 8.5/9.0
OS: Windows 7 64-bits, Android 2.1, Android 4.1.2, iOS 7
System: Pentium 7i, 6GB RAM, 750GB HD, DVD-RW (+/-), DV, 3TB EHD, 3D monitor without glasses
Thanks for pointing me into the right direction.
I need the eval() function.
Unfortunately this function doesn't work in flex.

_________________
Oscar Nijst
ON Education & Consultancy
Hengelo, The Netherlands
OPUS Pro 9.5
Pentium 7i, 16GB RAM, 1 TB HD, DVD-RW (+/-), DV, 3TB EHD, 3D monitor without glasses


Top
 Profile Visit website  
 
 Post subject:
PostPosted: January 18th, 2010, 1:19 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Quote:
I need the eval() function.
Unfortunately this function doesn't work in flex.
Maybe can do a 'workaround' for Flex type.

If you will only need a finite number of variables, you can create them manually... e.g., myvar01, myvar02, ... etc.

Then just set-up IF statements to key off of the value of 'i', and work with the appropriate variables.

I do not know Flex 'unsupported functions' very well... but I suspect another alternative in OpusScript would be to use Arrays... and you are automatically then working with an 'i' index. Maybe??? :idea:

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 24 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group