Announcement

Collapse
No announcement yet.

Changing Text From Input

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Changing Text From Input

    Hi everyone, i'm a bit newbie with autoplay and this is my first time i ask for your support guys.
    Okay so, I want to make an InputText correction, for example:

    1st Istance: The user types the number "1". => 1 digit number
    (With a Button or automatically) The InputText get corrected it to $1.

    2nd Istance: The user Types the number "1000". => 4 Digits number
    (With a Button or automatically) The InputText get corrected it to "$1.000"(Means one thousand in my country)

    3rd Istance: The user Types the number "1000000" => 7 digits number
    (With a Button or automatically) The InputText get corrected it to "$1'000.000".

    ---Alll this three examples in the same input text----

    Sorry if you get ofended with my "kindergarden" example is to be more specific for what i want.

    Attempts

    *I've used InputMask, but since the number digits are variate, is not possible to use.
    *I've tried to combine this function: >Here< with what i want but i don't know how to complete the fuction.
    *I've found one user who got it, but the code is not avaliable anymore(he removed it). Picture Here: http://widgo.com/t/trgSg.jpg


    Thanks a lot for reading!
    Hope you can help me guys!
    Regards!
    Danny.

  • #2
    After Many hours reading/checking the forum, i've found the solution for this.

    If you want to do what i want use:
    Code:
    stra = Input.GetText("Input1");  -------Get the input string ----------
    if (  String.ToNumber(stra) > 0 ) then     -----------Changes it to number-----------
          strFormat = string.format("%d.",stra);  
          result = Currency.Format(strFormat, LOCALE_USER_DEFAULT);  -----Makes use of the plugin(which is default set up to read your currency)------
          Dialog.Message("Notice", result, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);   ------Shows dialog of input with the applied format--------
          
       end
    Have fun! Link of the plugin:

    http://www.amsplugins.com/details.asp?ID=111&CID=1

    Includes Examples!

    Comment

    Working...
    X