sending hexadecimal control characters, how to?
Sarah Reichelt
sarah.reichelt at gmail.com
Thu Dec 3 05:26:56 EST 2009
On Thu, Dec 3, 2009 at 7:53 PM, Peter Alcibiades
<palcibiades-first at yahoo.co.uk> wrote:
> I need to send a plain ascii text file to a printer, which is going to be
> done, let's assume the file is printest, with
>
> cat printest>/dev/usb/lp0
>
> Which just dumps the text file to that device. There might be other ways
> to do it, but that is verified to work.
>
> For this to do some other stuff, it needs to have hex 07 at the end of it.
> Probably very simple but I never did this before
>
> How do you do it? Do I have to use send a raw key ascii code number
> somehow?
I have had a similar case where I had to send binary characters to a
receipt printer e.g. CHR 27.
It worked fine when I sent numToChar(27) instead,so I suggest you
convert your hex to decimal, then try sending numToChar of whatever
you get.
(I realise that if it is only hex 07, then sending numToChar(7) is
what you need to try, but there might be others, which is why I
explained my logic).
If this doesn't work, let me know and I will check my old code.
Cheers,
Sarah
More information about the use-livecode
mailing list