Printing The Label With Time/date フォローする

0
Avatar
Legacy Poster

Hello, All!

Maybe somebody can help me, please...?

 

We have a lot of printers (32) TSC TDP-225 and our goal is to print a little label with:

 

CURRENT_TIME        CURRENT_DATE

       

     yyyyyyyyyyyyyyyyyyyyyyy

 

    here_must_be_something

 

 

Where is yyyyyyy is depending on time - morning, evening...

Every time when user press FEED (MENU?) on the printer must print this letter. Here is our code for AUTO.BAS and it's not working..... somebody can help us?

 

AUTO.BAS:

 

 

DIRECTION 1
SET KEY1 OFF
SET KEY2 OFF
SET KEY3 OFF
KEY1=0
KEY2=0
KEY3=0
SET PRINTKEY ON
 
:START
 
IF KEY1=1 THEN
 
CLS
_H=VAL(FORMAT$(NOW$(),"h"))
_M=VAL(FORMAT$(NOW$(),"n"))
_S=VAL(FORMAT$(NOW$(),"s"))
 
_D=VAL(FORMAT$(NOW$(),"d"))
_MO=VAL(FORMAT$(NOW$(),"m"))
_Y=VAL(FORMAT$(NOW$(),"yy"))
 
IF _H<10 THEN  HOUR$="0"+STR$(_H) ELSE HOUR$=STR$(_H)
IF _M<10 THEN MINUTE$="0"+STR$(_M) ELSE MINUTE$=STR$(_M)
IF _S<10 THEN SECOND$="0"+STR$(_S) ELSE SECOND$=STR$(_S)
 
IF _D<10 THEN DATE$="0"+STR$(_D) ELSE DATE$=STR$(_D)
IF _MO<10 THEN MONTH$="0"+STR$(_MO) ELSE MONTH$=STR$(_MO)
IF _Y<10 THEN YEAR$="0"+STR$(_Y) ELSE YEAR$=STR$(_Y)
 
TEXT 18,20,"ARIAL12B.VF1",0,1,1, HOUR$+":"+MINUTE$+":"+SECOND$ + "        " +  DATE$+"."+MONTH$+"."+YEAR$
 
IF _H=>5 THEN IF _H<=10 THEN  TEXT 111,80,"ARIAL12B.VF1",0,1,1, "hello1"
IF _H=>11 THEN IF _H<=15 THEN TEXT 102,80,"ARIAL12B.VF1",0,1,1, "hello2"
IF _H>=17 THEN IF _H<=23 THEN TEXT 122,80,"ARIAL12B.VF1",0,1,1, "hello3"
 
TEXT 92,140,"ARIAL12B.VF1",0,1,1,1, "here_must_be_something"
 
PRINT 1,1
 
ELSEIF KEY2=1 THEN
CLS
TEXT 100,10,"3",0,1,1,"KEY2  is pressed!!"
PRINT 1,1
ELSEIF KEY3=1 THEN
CLS
TEXT 100,10,"3",0,1,1,"KEY3 is pressed!!"
TEXT 100,60,"3",0,1,1,"End of test"
PRINT 1,1
 
SET KEY1 ON
SET KEY2 ON
SET KEY3 ON
END
ENDIF
 
GOTO START
 
EOP
 

サインインしてコメントを残してください。