The text of a manual · part 20 of 25
Application Builder for DuraTrax/LaserLite/LaserLite Pro/LaserLite Mx, for Windows Computers, pages 191 to 200
Pages 191 to 200 of 245
The original document is the PDF (2.4 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Videx DuraTrax, Videx LaserLite, Videx LaserLite Mx and Videx LaserLite Pro
Page 191
35. The Display window opens (Figure 4-62).
Figure 4-62 Display Window 36. Click Text from the tool palette (Figure 4-63).
Figure 4-63 Display Window - Select Text Tool 37. The Display window shows the text entry screen (Figure 4-64).
Figure 4-64 Display Window - Text Tool Selected
Chapter 4 Advanced Application Building
183
Page 192
38. Type Scan bar code on the top line. DO NOT PRESS <ENTER> YET. Use your mouse to click at the beginning of the second line (Figure 4-65) or use the arrow keys on your computer’s keyboard to move the cursor to the beginning of the second line. Note: The <Enter> key does not produce a line return in the Display window; it is only used to accept the text entry.
Figure 4-65 Display Window - First Line of Text Entered 39. Type on badge. on the second line (Figure 4-66).
Figure 4-66 Display Window - Second Line of Text Entered 40. Press <Enter> to accept the text entry. The entered text appears in the display area at the left of the Display window (Figure 4-67).
Figure 4-67 “Instruct1” Handler Display Message Entered 184
Chapter 4 Advanced Application Building
Page 193
41. Select the “Instruct2” Handler (Figure 4-68). The “Instruct2” Handler will be stepped to if the user does not scan a valid location bar code. In this example we are assuming the location bar codes are on the door of the location, so we will use Scan bar code on door. as our instruction message.
Figure 4-68 “Instruct2” Handler Selected 42. At the Display window, type Scan bar code on the top line, and type on door. on the second line (Figure 4-69).
Figure 4-69 “Instruct2” Handler Message
Chapter 4 Advanced Application Building
185
Page 194
43. Press <Enter> to accept the text entry. The entered text appears in the display area at the left of the Display window (Figure 4-70).
Figure 4-70 “Instruct2” Handler Message Entered 44. Select the “Instruct3” Handler (Figure 4-71). The “Instruct3” Handler will be stepped to if the user does not scan a valid status bar code. In this example we are assuming the status bar codes are on the scanpad being carried by the guard, so we will use Scan Status bar code on scanpad. as our instruction message.
Figure 4-71 “Instruct3” Handler Selected
186
Chapter 4 Advanced Application Building
Page 195
45. At the Display window, type Scan Status bar on the top line, and type code on scanpad. on the second line (Figure 4-72).
Figure 4-72 “Instruct3” Handler Message 46. Press <Enter> to accept the text entry. The entered text appears in the display area at the left of the Display window (Figure 4-73).
Figure 4-73 Instruct3 Message Entered
Chapter 4 Advanced Application Building
187
Page 196
47. Select the “Instruct4” Handler (Figure 4-74). The “Instruct4” Handler will be stepped to if the user does not scan a valid location or guard bar code after scanning a status bar code. We will use Scan bar code on door or badge. as our instruction message.
Figure 4-74 “Instruct4” Handler Selected 48. At the Display window, type Scan bar code on on the top line, and type door or badge. on the second line (Figure 4-75).
Figure 4-75 “Instruct4” Handler Message
188
Chapter 4 Advanced Application Building
Page 197
49. Press <Enter> to accept the text entry. The entered text appears in the display area at the left of the Display window (Figure 4-76).
Figure 4-76 Instruct4 Message Entered 50. Save the application by choosing Save from the File menu or by typing Ctrl+S. 51. Transfer the Security application to your data collector. 52. Use the bar codes on page 200 to enter a security round. To see how the Detour Handlers operate, scan the bar codes out of order; the Detour Handler messages will instruct you on what should be scanned.
Chapter 4 Advanced Application Building
189
Page 198
Plug-Ins Application Builder uses a template (Describe.src) to generate source code in BASIC. This process is discussed in detail in the Developer’s Reference Manual. A plug-in is BASIC source code that is inserted into the application by Application Builder. Plug-ins provide additional features when creating applications, but they require familiarity with BASIC programming. To use plug-ins effectively, one must also be familiar with the source code template, Describe.src, which is used by Application Builder. The table on page 193 lists some common and useful plug-ins. ($ represents a string; % represents a number; italics represent a variable.) To add a plug-in to an application, open the application in Application Builder, and click the appropriate handler. Open the Properties window by clicking Properties Window or by choosing Properties Window from the View menu. Click Actions in the Properties window’s Category list. Choose Run plug-in from the Action description pop-up menu; a text area will appear in the Properties window. Click within the text area and enter the text of the desired plug-in. Click Add and the plug-in will be added to the list of actions performed by that handler. Application Builder supports up to 16 plug-ins per handler; each plug-in can be up to 63 characters long. It is possible to incorporate more than one line of Videx BASIC code in a single plug-in by pressing <Ctrl><Enter> at the end of each line of code. If more than one plug-in action is run on an input handler, those lines of Videx BASIC code are inserted consecutively into the source code for the application. One of the most common reasons to use plug-ins is for applications with exceptional requirements for the format of the data file. For example, plug-ins can be used to modify the format of the time and date, to write fixed-width fields to the data file, or to strip the family code from iButton reads. In these applications, the general form of the plug-ins would be: var$ = expression print #0, delimiter$; var$; 190
Chapter 4 Advanced Application Building
Page 199
where var$ is the information to be written to the data file and delimiter$ is the desired delimiter between fields in each record of the data file. For example, if the data file is delimited by commas, delimiter$ = “,”. If the data file is delimited by tab characters, delimiter$ = chr$(9). If quotes are required around each field, they can be written to the data file as chr$(34). Refer to the Videx BASIC manual for more information on the print statement and the chr$( ) function. Application Builder version 2.1.0 and higher implements a feature which allows text files to be included within the BASIC source code of an application. This feature is useful in situations in which several plug-ins are required. The syntax for including the Videx BASIC code contained in myfile.txt is: INCLUDE “myfile.txt” If this statement is run as a plug-in within an Application Builder application, the code contained in myfile.txt is inserted into the application at that point. Customized Templates Application Builder uses an extremely flexible method to generate BASIC source code. A template file is parsed and copied directly into the source file, until a tilde (~) character is reached. All text between ~’s is interpreted as code generation directives. The code generation directives use the information provided by the user via the Application Builder graphical interface to generate custom BASIC code for a particular application. This process is described in detail in the Developer’s Reference Manual. By default, Application Builder uses a file called describe.src as a template for generating source code. Some applications have exceptional requirements which cannot be accommodated within the Application Builder interface, even with the use of plug-ins. In these situations, use of a customized template will often provide the required functionality. Application Builder version 2.1.0 and higher implements the ability to use a template file other than describe.src to generate the source code. If Chapter 4 Advanced Application Building
191
Page 200
an alternative template is desired, add a plug-in action to the “Begin” handler using the syntax: $TEMPLATE “mytemp.src” where mytemp.src is the name of the template file to be used. The Application Builder software package (version 2.1.0 and higher) includes four template files: •= describe.src – the default template, appropriate for most applications •= timewand.src – similar to describe.src, except that a TimeWandstyle raw scan file is produced •= mx.src – generates applications which utilize the LaserLite Mx memory card •= touch.src – generates applications which utilize the TouchMemory read/write capabilities of the DuraTrax and LaserLite Pro Examples of applications in which use of a customized template is appropriate include modification of the functionality of the scrolling keys or changing the name of the data file which is downloaded from the data collector. Use of Function Keys (LaserLite Pro and LaserLite Mx only) Pressing a function key (F1 through F5) on the LaserLite Pro or LaserLite Mx generates an event which is returned by the INPUTEVT statement in Videx BASIC. The template files provided with Application Builder (describe.src, timewand.src, touch.src, and mx.src) include code which simulates a user input when these keys are pressed. For example, if the F1 key is pressed, a user input of “<<F1>>” is generated by the application. If there is a handler available which will accept this input, the application will step to that handler and perform its actions. Note that it would usually not be appropriate to include the action “add input” on this handler, because “<<F1>>” would be written to the data file. Pressing the F2 key simulates a user input of “<<F2>>”; pressing the F3 key simulates a user input of “<<F3>>”; and pressing the F4 key simulates a user input of “<<F4>>”. Use of handlers which accept these 192
Chapter 4 Advanced Application Building