Skip to main content

Search

Search

Bug Vb Script With Printer Code Modifiers With Dpl Raster Image

Comments

3 comments

  • Avatar
    Legacy Poster

    Sorry, space character (ASCII 32) - ASCII 30.

    0
  • Avatar
    Ian Cummings
    Moderator

    It seems to be the NUL value 0x00 that's getting dropped.

     

    In any case, the ReadLine/WriteLine PCM methods can not be used on binary data because they work with strings and not bytes.  To do simple read and write of bytes the following should get you started:
     
    Option Explicit
    
    Dim byteBuf()
    Dim codeSize, numRead, numWritten
    
    codeSize = PCM.InputFileSize
    numRead    = 0
    numWritten = 0
    
    ReDim byteBuf(codeSize)
    numRead = PCM.ReadBytes(byteBuf, codeSize)
    numWritten = PCM.WriteBytes(byteBuf, numRead)
    

     

    You will need to write code to spin through the byte buffer and replace (or write out) the bytes desired.
    0
  • Avatar
    Legacy Poster

    Thanks Ian,

     

    I appreciate the info regarding PCM.ReadLine/WriteLine and binary data.  Because everything I do will include some level of binary data, it appears that I will never be able to use the PCM.WriteLine method.  

     

    Thanks also for this code snippet staring point.  I think there's a need for more example code sets on the PCM help section of Bartender.  I'll see what I can accomplish from your starting point, and post a more generic solution.

     

    Thanks again,

    0

Please sign in to leave a comment.