Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2004
    Posts
    41

    Peekaboo! Breaking up text into 2 characters

    Anyone tell me how this works and how I would build it?

    I need to take a 12 character string, split into groups of two characters in one string with seperaters of a colon, yes its a MAC Address

    sText = "danymaordanymaor"

    -- returns a table of the string divided
    tblResult = DivString(sText, 2)

    --show the results in a input box
    if tblResult then
    for n=1, Table.Count(tblResult) do
    Input.SetText("Input1", Input.GetText("Input1")..tblResult[n].."\r\n")
    end
    end



    Thanks

    Phil Merry

  2. #2
    Join Date
    Feb 2009
    Posts
    1,285
    Here, take a look at this APZ. On the globals there are the functions used in the project with some help in the comments



    I hope it helps
    Attached Files
    Last edited by T3STY; 02-15-2011 at 06:01 PM.

  3. #3
    Join Date
    Apr 2004
    Posts
    41
    Thanks, just what I wanted

    Phil

  4. #4
    Join Date
    Apr 2004
    Posts
    41
    T3STY - didn't work in AM6, lol

  5. #5
    Join Date
    Feb 2009
    Posts
    1,285
    It's obvious it didn't work in AMS 6... AMS 6 (also 7.0 and 7.5) uses LUA 5.0; instead AMS 8 uses LUA 5.1. Get a look over here to understand more:
    http://www.indigorose.com/forums/thr...and-AutoPlay-8

    shortly: delete the pairs() function, leave only the table name to use in AMS 6/7/7.5

Posting Permissions

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