Zum Hauptinhalt gehen

Suche

Suche

Random Alpha Serialization

Kommentare

4 Kommentare

  • Avatar
    Legacy Poster

    Personally, I would pre-generate an Excel file with random values. You technically could script this into the format, but it would be less controllable and you couldn't check for duplicates before starting :)

    0
  • Avatar
    Domingo Rodriguez
    Moderator

    You can try using some VBScripting inside the bar code object in BarTender. I haven't tried this out, but the following VBScript function creates a random 8 character string which contains 1 digit. You would need to modify this in order for getting a 5 character random string:

     

    <%
    function RandomString()

    Randomize()

    dim CharacterSetArray
    CharacterSetArray = Array(_
    Array(7, "abcdefghijklmnopqrstuvwxyz"), _
    Array(1, "0123456789") _
    )

    dim i
    dim j
    dim Count
    dim Chars
    dim Index
    dim Temp

    for i = 0 to UBound(CharacterSetArray)

    Count = CharacterSetArray(i)(0)
    Chars = CharacterSetArray(i)(1)

    for j = 1 to Count

    Index = Int(Rnd() * Len(Chars)) + 1
    Temp = Temp & Mid(Chars, Index, 1)

    next

    next

    dim TempCopy

    do until Len(Temp) = 0

    Index = Int(Rnd() * Len(Temp)) + 1
    TempCopy = TempCopy & Mid(Temp, Index, 1)
    Temp = Mid(Temp, 1, Index - 1) & Mid(Temp, Index + 1)

    loop

    RandomString = TempCopy

    end function
    %>

     

    However, if you're wishing a unique string to be created each time, you would better go for a serialized string.

     

    Do you have basic knowledge of BarTender? Do you e.g. know how to create a Code 39 bar code or how to create a serial sequence?

    0
  • Avatar
    Legacy Poster

    Do you have basic knowledge of BarTender? Do you e.g. know how to create a Code 39 bar code or how to create a serial sequence?

    Thank you for answering.

    No! no basic knowledge and no knowedge on how to create a Code 39 bar code nor how to create a serial sequence.

    A 5 letter string is not necesary 3 or any number is OK.

    I have not found dode 39 in BarTender.

    0
  • Avatar
    Domingo Rodriguez
    Moderator

    Let's see if the following Training Videos help you to start creating your BarTender documents:

     

    Getting Started with BarTender:

    http://www.bartenderbarcodesoftware.com/label-software/training-video-(getting-started).aspx

     

    Setting up your blank labels:

    http://www.bartenderbarcodesoftware.com/label-software/training-video-(page-setup).aspx

     

    Reading Label Data from a Database or Excel Spreadsheet:

    http://www.bartenderbarcodesoftware.com/label-software/training-video-(reading-data-from-database).aspx

     

    If you've no VBScript knowledge, it might be better that you follow the advice from nRyder.

     

    Code 39 (regular or Full Ascii) is available as a bar code standard. You just need to click on the "bar code" drop-down list in BarTender's "object" tool bar and then choose the desired bar code.

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.