Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2007
    Posts
    15

    Hex To Dec Converter

    hello friends,
    I would like a hex to dec converter create.
    how can I input 1 Input.
    1 Input to create output.
    I input multiple output ok.
    with 1 input does not work.
    Please help me thank.

    Deutsch /Germany :
    hallo freunde,
    ich möchte ein hex to dec converter erstellen.
    wie kann ich 1 Input eingang,1 Input mit ausgang erstellen.
    mir mehreren ausgang Input ok,mit 1 Input klappt nicht.
    Bitte helfen Sie mir danke.

    Very little do I enlisch


    as the visual input with multiple output ok (My project1)


    this image with 1 input not ( mit disesem bild mit ein ausgang klappt nicht. (My project2)
    Attached Files
    Last edited by BERKANT74; 03-25-2009 at 07:23 PM.

  2. #2
    Join Date
    Sep 2008
    Posts
    14
    For My Project1.apz

    On Click the button "Button2":

    Code:
    function HexToDec(strHex)
        local tblResult = {};
        local strHex = String.Replace(strHex, " ", "", false);
        for i = 1, String.Length(strHex), 2 do
            tblResult[Table.Count(tblResult) + 1] = Math.HexToNumber(String.Mid(strHex, i, 2));
        end
        if (Table.Count(tblResult) == 0) then return nil else return tblResult end
    end
    
    
    
    tblDec = HexToDec(String.Lower(Input.GetText("HexToDec")));
    if (tblDec ~= nil) then
        for i, v in tblDec do
            Input.SetText("Dec_Out"..i, v);
        end
    end
    For My Project2.apz

    On Click the button "Button2":

    Code:
    function HexToDec(strHex)
        local tblResult = {};
        local strHex = String.Replace(strHex, " ", "", false);
        for i = 1, String.Length(strHex), 2 do
            tblResult[Table.Count(tblResult) + 1] = Math.HexToNumber(String.Mid(strHex, i, 2));
        end
        if (Table.Count(tblResult) == 0) then return nil else return tblResult end
    end
    
    
    
    tblDec = HexToDec(String.Lower(Input.GetText("HexToDec")));
    if (tblDec ~= nil) then
        local strOut = "";
        for i, v in tblDec do
            v = String.Repeat("0", 3 - String.Length(v))..v;
            strOut = strOut.." "..v;
        end
        Input.SetText("Dec_Out1", strOut);
    end
    Last edited by Kick; 03-26-2009 at 09:55 AM. Reason: Added code to the second project

  3. #3
    Join Date
    Mar 2007
    Posts
    15
    Hello "Kick"

    What more can you ask for.
    Simply perfect brilliantly.
    Thank you very much for everything.
    Last edited by BERKANT74; 03-26-2009 at 05:23 PM.

Similar Threads

  1. Hex to Dec
    By SteveStation in forum AutoPlay Media Studio 6.0
    Replies: 8
    Last Post: 05-21-2007, 02:02 AM
  2. Adding Hex numbers
    By mrdude in forum AutoPlay Media Studio 6.0
    Replies: 1
    Last Post: 09-23-2005, 03:22 PM
  3. HEX to ASCII converter
    By SUF6NEWBIE in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 01-14-2005, 05:14 PM
  4. Program: Binary Hex and Decimal Converter
    By Protocol in forum AutoPlay Media Studio 5.0 Examples
    Replies: 3
    Last Post: 07-15-2004, 12:11 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