In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

Scripting

Xailer professional forum in English
Nick Hilder
Mensajes: 328
Registrado: Mar Nov 21, 2006 2:10 am

Scripting

Mensaje 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
Responder