Página 1 de 1

Scripting

Publicado: Lun Feb 11, 2008 12:34 am
por Nick Hilder
Howdy
I have an application that runs on a handheld data terminal. The app runs in
a telnet session. I need to be able to print to Zebra thermal label
printers, which I'm already doing, just not in this app. The printers all
have network cards etc.
I don't want to hardcode the label layout in the application for obvoius
reasons. I would like to be able to call a script . For this to work I need
to expose variables etc to the script. Does XH have native scripting or
should I purchase the Xailer scripting option?
It's very simple scripting, basically like this.
if Type("cLabel") == "U"
EchoWarn("This script can only be called internally")
Return
endif
cLabel := "^XA" + CRLF
cLabel := cLabel + "^FO300, 50^BC,60, N, N, N^FD" + cLblNum + "^FS" +
CRLF
cLabel := cLabel + "^FO200, 130^A0N,50,60^FD" + cLblName + "^FS" + CRLF
cLabel := cLabel + "^FO200, 180^A0N,30,40^FD" + "BIN: " + cLblBin +
"^FS" + CRLF
cLabel := cLabel + "^PQ"+Alltrim(Aschar(nQty,0)) + CRLF
cLabel := cLabel + "^XZ"
Regards Nick