Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2007
    Posts
    16

    Star string for text file to variable

    Hi,
    I'have some problem to load a string from file to variable or table.
    Ex.
    I' have this string in textfile:
    X,Y,Z,2,5
    H,J,K,6,3
    .......
    I' want load this in a some Variable or Table and add to listbox only the first letter.

    If you have some code please send me.

    Thanks

  2. #2
    Join Date
    Oct 2002
    Location
    RealFake, RF
    Posts
    403
    Hey there felice...

    The easiest way would be to use the "textfile to table" function. So if your textfile has 4 lines of text...say:

    www
    xxx
    yyy
    zzz

    Then using the textfile to table function (and calling the table MyTable) would create a table called MyTable which would look something like this to the computer:

    {www,xxx,yyy,zzz}

    You could then call upon any of that table's elements by requesting the info from a specific slot. In this case www=1, xxx=2, yyy=3 and zzz=4. You could convert a table's element into a variable (say..."MyVariable") using the following code:

    MyVariable = MyTable[1]

    This would mean that wherever you use the variable "MyVariable", it would have the value of "www" (or whatever is in position 1 in the table you created ealier). If you typed "MyVariable = MyTable[3]", then "MyVariable" would have the value of "yyy" (or whatever was in position 3 in the table you created), etc.

    You can then use the String Left funtion to create a string from the Left-most character of the new String called "MyVariable" calling it...say..."MyString". Now if MyVariable had a value of "www", then MyString has a value of "w".

    Now use the Add To Listbox function and insert MyString to the index of your choice (0 being the first index and -1 being the last).

    These are listed in the help and tutorial section of AMS, but I know that it's sometimes easier to have someone walk you through it. Play around a bit with these directions and modify as you see fit. Have fun! Let me know if this isn't what you were looking for...
    "White-colla-AMS-gangsta."

Similar Threads

  1. Best way to share custom buttons with the group?
    By mwreyf1 in forum AutoPlay Media Studio 6.0
    Replies: 10
    Last Post: 04-28-2010, 01:29 PM
  2. 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
  3. Replies: 0
    Last Post: 08-17-2000, 02:29 PM

Posting Permissions

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