Custom Hex Barcode Help
Our barcodes have a human readable format as follows: 020-000-017-243
When the barcode is scanned it returns Hex. In this case 140011F3. This is broken down as follows:
020 = 14
000 = 00
017 = 11
243 = F3
I am trying to figure out how to create barcodes like this but I am not having any success. I would like to be able to enter 020-000-017-243 and have the barcode ignore the dashes and return the hex when scanned. Any help would be appreciated, I am new to this software and don't have any experience. Am I correct in guessing that I will need to write some VB?
Chirs
-
Basically what you'll need to do is create the text and barcode as two separate objects. Give the text object a sharename so it can be used as a source for the barcode (for this example i've called it 'source'). Then in the barcode use a VB script like this:
data = split(Format.NamedSubStrings("source").Value,"-")
for i= 0 to 3data(i) = hex(data(i))if len(data(i)) = 1 then data(i) = "0" & data(i)nextvalue = data(0) & data(1) & data(2) & data(3)basically this does three things, splits the data at the dashes and puts it into an array, checks to make sure that if one of the strings starts with a zero and gets parsed that it contains the leading zero, and then concatenates the strings into a single string.But this will achieve the result you're looking for.0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar