On Barcode, MSR, or RFID Scan

This option runs a script each time the scanner is used. To execute a script using this method, launch the TE Client and then use the scanner.

The following sample script inserts a string (which could be just one character long) after the first six characters of any barcode at least six characters long.

A few notes about this sample script:

ScanData is a string variable with the original barcode.

NewString is a variable where you store the new barcode.

ScanType is the number variable that keeps the type of scan data received.

OldLength is an integer variable.

XXYY is the string you insert.

OldLength=String_Length(ScanData)

If (Number_Greater_Than_Or_Equal(OldLength,6))

NewString=String_Combine(String_Left(ScanData,6), “XXYY” )

NewString = String_Combine(NewString,String_Right(ScanData,

Number_Minus(OldLength,6)))

Else

NewString = ScanData

End_If

Scan_String(NewString,ScanType)

Return

This second example converts any DataMatrix scan values to PDF417 scan values. The ScanData and ScanType variables described for the previous example are used again.

If (Number_Equal(ScanType,Get_Scan_Type_Value("DATAMATRIX")))

Scan_String(ScanData,Get_Scan_Type_Value("PDF417"))

Else

Scan_String(ScanData,ScanType)

End_If

Return

 


Was this article useful?    

The topic was:

Inaccurate

Incomplete

Not what I expected

Other

Privacy and Legal