Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2007
    Location
    Missouri, United States
    Posts
    476

    Complete Loss of Brain Power...Variable problem stuck like chuck

    As I stated above im stuck like chuck lol.
    How can I use the string value of 1 variable as the name of another.


    EXAMPLE -

    var1 = 'testing'
    var2 = 30

    im trying to automatically create the variable below from the ones above if that makes sense.

    testing = var2

    Is this even at all possible in AMS???
    Last edited by TimeSurfer; 01-26-2008 at 08:57 PM.

  2. #2
    Join Date
    May 2005
    Posts
    1,115
    Quote Originally Posted by TimeSurfer View Post
    Is this even at all possible in AMS???
    Yes, but you should use tables:

    Code:
    myvar = {};
    
    myNewVarName = 'UberCoolVar';
    myRandomValue = 30;
    
    myvar[myNewVarName] = myRandomValue;
    So, you can always reference to this value using table approach.
    If you would (hypothetically) know the name variable in front,
    you could access it like this as well:

    Code:
    someHardCoredVar = myvar.UberCoolVar;
    You can put as much custom variables as you want in this table as you please.
    Last edited by bule; 01-27-2008 at 03:53 AM.
    Never know what life is gonna throw at you.
    (Based on a true story.)

  3. #3
    Join Date
    Oct 2005
    Location
    American Dubai
    Posts
    629
    Hi.
    Well, it is possible in AMS

    here, try this (in attachment) and tell me how it goes
    (In input 2, don't forget the quotation marks when assigning a string value)

    (also, to test if the variable exists. you could use Dialog.Message or Input.SetText, etc.)

    Quote Originally Posted by TimeSurfer View Post
    As I stated above im stuck like chuck lol.
    How can I use the string value of 1 variable as the name of another.


    EXAMPLE -

    var1 = 'testing'
    var2 = 30

    im trying to automatically create the variable below from the ones above if that makes sense.

    testing = var2

    Is this even at all possible in AMS???
    Attached Files

  4. #4
    Join Date
    Dec 2007
    Location
    Missouri, United States
    Posts
    476
    thank you mina, thanks bule ill try them both appreciate the help very much

Similar Threads

  1. Stuck... variable problem
    By TimeSurfer in forum AutoPlay Media Studio 7.5
    Replies: 2
    Last Post: 01-10-2008, 09:27 AM
  2. problem with variable
    By UweGeercken in forum Setup Factory 6.0
    Replies: 2
    Last Post: 07-12-2004, 04:15 AM
  3. INFO: JET and MDAC (Complete) Runtime Notes
    By Desmond in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 11-28-2003, 08:35 AM
  4. INFO: Tips for Debugging Action Lists in AutoPlay Media Studio 4.0
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-03-2002, 08:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts