Scripting - Padding ScanData with 0's

Version 3

    Verified Product Versions

    Wavelink Terminal Emulation 7.3Wavelink Terminal Emulation 7.2Wavelink Terminal 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 )

        End_While

        Comment: Use the update scan data.

        Scan_String( sData, nType )

        Return

     

     

    Example:

     

    Scanned Data:

     

    Before script: 123456789

    After script: 00000123456789