Scripting - Padding ScanData with 0's

Version 3

    Verified Product Versions

    Terminal Emulation 7.3Terminal Emulation 7.2Terminal Emulation 7.0

    The Following script will prepend 0's to Scanned Data until it reaches the length of 14..


    Script( 0_Scan_Padding )

    String( sData )

    Number( nType )

    Activate( On_Input, sData, nType )

        Comment: Prepend zeros to the scan data until it is 14 characters long.

        While( Number_Less_Than( String_Length( sData ), 14 ) )

            sData = String_Combine( "0", sData )


        Comment: Use the update scan data.

        Scan_String( sData, nType )






    Scanned Data:


    Before script: 123456789

    After script: 00000123456789