Some applications generate a text file containing data for printing on labels and it is convenient to have dLabel (or the dBarcode Suite) start up automatically when the data file is created, print the labels, and then close down. This may be achieved by following either of the methods described below. These examples assumes that dLabel is installed in C:\DLABEL. If your dLabel program is installed in a different directory replace “c:\dLabel” with your installation directory.
Method 1 - Using a Windows Schedule
1. Create the label template in the normal way.
2. Create a dummy text file containing a small amount of data (eg. test.txt) Make a backup copy of this file because you will need to replace the original if using the delete command in the batch files below.
3. On the dLabel Database menu choose File - Use - and select the text data file, ensure that the line, field and record separators you will use are also entered.
4. Save the label template with a suitable name (eg. test.dlt)
5. Create a Windows "Shortcut" with a command line which loads dLabel and the required template, eg. c:\dlabel\dLabel2k.exe c:\dlabel\test.dlt Give it a name such as dlabeltext.lnk
6. Drag the shortcut from the desktop to c:\ Then double click on it to ensure that it does correctly open dLabel complete with the associated data.
7. Create two batch files using a text editor such as Notepad. In this example the files are called RDL.BAT and RDL2.BAT.
RDL.BAT contains
if exist c:\dLabel\test3.txt call
c:\rdl2.bat
RDL2.BAT contains
c:\dlabel\dlabel2k.exe /pt
c:\dlabel\test.dlt \P
del c:\dlabel\test.txt
Note that the /P requires an uppercase P. This causes the data to be printed and the program to close. In the absence of the /P the program halts and displays the labels in normal view.
8. Check that running RDL.BAT from a command prompt does correctly open dLabel complete with the associated data.
7. Create a scheduled task which runs c:\rdl.bat at regular
intervals throughout the working day. Timing will vary according to your
requirements, but could be for example every 5 minutes. On Win98 and Win2000
this is done using the task scheduler in the Control Panel. On Win NT is can be
done using an AT command of the form
AT EVERY 5 MINS C:\RDL.BAT
Method 2 - Using dLabels Wait parameter.
1. Create the label template in the normal way.
2. Create a dummy text file containing a small amount of data (eg. test.txt) Make a backup copy of this file because you will need to replace the original if using the delete command in the batch files below.
3. On the dLabel Database menu choose File - Use - and select the text data file, ensure that the line, field and record separators you will use are also entered.
4. Save the label template with a suitable name (eg. test.dlt)
5. Create a Windows "Shortcut" with a command line which loads dLabel and the required template and includes the \Wtt parameter, eg. c:\dlabel\dlabel2k.exe /pt c:\dlabel\test.dlt \W60
The \W parameter causes dLabel to check every tt seconds to see whether the “Used” data file exists. If it does exist, it is loaded, printed and then deleted.
While this is a simpler approach it does require that dLabel is running and using memory continuously.
Note that any pathnames that contain spaces need to be enclosed in quotation marks.
More: