DLSoft Application Note 03011 Starting dLabel-32/dIndex-32/dBarcode-2000 automatically when a database file is created. Applies to dLabel-32 v 4.65, dIndex-32 v 4.65 and dBarcode-2000 v 1.25, all dated 29 March 2001, or later. Some applications generate a text file containing data for printing on labels and it is convenient to have dLabel-32 (or dIndex or dBarcode-2000) start up automatically when the data file is created, print the labels, and then close down. This may be achieved by following the steps below. This example assumes that dLabel-32 is installed in C:\DLABEL Method 1 - Using a Windows Schedule 1. create the label style 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 style with a suitable name (eg. test.dlt) 5. create a Windows "Shortcut" with a command line which loads dLabel and the required style, eg. c:\dlabel\dlabel4.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\dlabel4.exe 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 paratemeter. 1. create the label style 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 style with a suitable name (eg. test.dlt) 5. create a Windows "Shortcut" with a command line which loads dLabel and the required style and includes the \Wtt parameter, eg. c:\dlabel\dlabel4.exe 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. dLSoft March 2001 updated Jan 2002