home *** CD-ROM | disk | FTP | other *** search
/ Share Gallery 1 / share_gal_1.zip / share_gal_1 / UT / UT214.ZIP / SEBFU40.LZH / SEBFU.DOC < prev    next >
Text File  |  1991-09-27  |  42KB  |  1,171 lines

  1.  
  2.                             S E B F U   Version 4.0
  3.  
  4.  
  5.                       (C) 1989-1991   Scanlon Enterprises
  6.  
  7.  
  8.  
  9.                         SUMMARY REFERENCE / USER GUIDE
  10.  
  11.  
  12.  
  13.  
  14.  
  15.        SEBFU is a series (over 80) of utilities to enhance the use of 
  16.        batch files. SEBFU, in addition to enhancing the DOS batch file 
  17.        capability, also offers many utilities which will aid the novice, 
  18.        intermediate and advanced user.
  19.  
  20.  
  21.        Registering SEBFU, has several advantages over registering these 
  22.        utilities separately.
  23.  
  24.                1) Price ....... All utilities, if ordered separately 
  25.        would cost your $113.50, registering SEBFU as a package is only 
  26.        $19.95, you save over $90 !
  27.  
  28.                2) You get enhanced versions of many utilities, plus 
  29.        several additional utilities (see ORDSEBFU.DOC for details).
  30.  
  31.                3) You will be supporting the Shareware process, to keep 
  32.        quality products arriving in the market.
  33.  
  34.                4) Additional advanced usage guide and batch file 
  35.        tutorial, with help for the novice and intermediate user.
  36.  
  37.  
  38.        If you need only a few of the SEBFU utilities, then by all means, 
  39.        please register only the ones you need ! You will still be placed 
  40.        on our mailing list and will be supporting the Shareware concept.
  41.  
  42.  
  43.        Each SEBFU utility has a separate DOC file, which has the same 
  44.        name as the utility with the extension COM .  These DOC files 
  45.        contain all basic usage instructions, Syntax, Defaults, 
  46.        Errorlevels (if supported) and any Examples which may benefit the 
  47.        user. There is NO generalized explanation of batch file usage, as 
  48.        that is covered in the batch file tutorial, which is sent upon 
  49.        registration of SEBFU .
  50.  
  51.        In this document, we will attempt to give you ideas in using 
  52.        SEBFU as a set of powerful aids in developing your own batch 
  53.        files, from simple uses to advanced uses.
  54.  
  55.        Also, we will explain the usage of each of the utilities which 
  56.        are useful from the DOS prompt or run from an application.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.                                       1
  66.  
  67.                             S E B F U   Version 4.0
  68.  
  69.  
  70.                       (C) 1989-1991   Scanlon Enterprises
  71.  
  72.  
  73.  
  74.                         SUMMARY REFERENCE / USER GUIDE
  75.  
  76.  
  77.  
  78.  
  79.  
  80.        Many of the SEBFU utilities can be executed from the DOS command 
  81.        line (called the prompt). These utilities include :
  82.  
  83.                ACOLOR ....... Sets the ANSI color, ANSI.SYS must be
  84.                               installed.
  85.                CGABORDR ..... Changes the border on CGA systems
  86.                CHKSUM ....... Generates Check sums for files
  87.                CURSOR ....... Sets the Cursor attributes
  88.                DLST ......... Enhanced replacement for DOS DIR cmd.
  89.                FNDHID ....... Finds hidden files on a drive
  90.                FSIZE ........ Reports the number of files, their total
  91.                               size, bytes required on floppy disks and
  92.                               bytes required on hard drives.
  93.                GETMCB ....... Reports on memory usage, such as TSR
  94.                               location and size.
  95.                HDTYPE ....... Reports on drive types supported by the
  96.                               computer Bios.
  97.                KILL0 ........ Deletes files which have zero bytes
  98.                LOG .......... A computer logging system
  99.                PAGE ......... Change video pages
  100.                PRINTC ....... Send control sequences to the printer
  101.                SV28 ......... Set EGA/VGA to 28 lines
  102.                SWPRN ........ Swap 2 printer ports
  103.                TD ........... Displays Time & Date
  104.  
  105.        16 utilities, Your registered version will have even more! 
  106.  
  107.        Several of the above utilities will also be very useful when run 
  108.        from a batch file, such as the TD and DLST utilities.
  109.  
  110.        ACOLOR can be executed from a DOS prompt, but can also be very 
  111.        useful when included in a batch file. Since ACOLOR and many other 
  112.        SEBFU utilities require selecting the color, we suggest you print 
  113.        a copy of COLOR.DOC . To do this, enter the following command 
  114.        from your DOS prompt.
  115.  
  116.                COPY COLOR.DOC PRN
  117.  
  118.        You could, also, use any text editor to print it.
  119.  
  120.        ACOLOR requires both foreground an background colors be 
  121.        specified, such as :
  122.  
  123.                ACOLOR 1 7
  124.  
  125.        Which selects the colors of white on blue (white is 7 and 1 is 
  126.        blue), note that the background color is first after the utility 
  127.        name. ACOLOR.COM could also be renamed to some other name such as 
  128.        COLOR.COM or C.COM .
  129.  
  130.                                       2
  131.  
  132.        ACOLOR is also very useful from a batch file, such as setting the 
  133.        colors when using the DOS echo command. You could display error 
  134.        messages in red (on black) as in this example.
  135.  
  136.                ECHO OFF
  137.                CLS
  138.                {Function which produces an errorlevel of 1 if failure}
  139.                IF ERRORLEVEL 1 GOTO FAIL
  140.                ECHO Function ok
  141.                GOTO XIT
  142.                :FAIL
  143.                ACOLOR 0 4                 {Set red on black}
  144.                ECHO Function Failed
  145.                BEEP
  146.                ACOLOR 0 7                 {Back to white on black}
  147.                :XIT                       {End of batch file
  148.  
  149.        The BEEP is one of the SEBFU utilities, and simply beeps the 
  150.        speaker. This is done to draw attention to the error.
  151.  
  152.        CGABORDER is a nifty utility to draw a border around video area. 
  153.        The border is the area at the outer edges of the video display, 
  154.        and is normally black. CGABORDR accepts all background colors as 
  155.        listed in the COLOR.DOC file.
  156.  
  157.        CHKSUM is a little utility which can serve as a basic virus check 
  158.        system. Just generate checksums for all your EXE and COM files, 
  159.        these are the ones a virus can attach to. Once the original check 
  160.        sums have been generated, simply verify the check sums on a 
  161.        regular basis, by using the syntax : CHKSUM fname chksum, where 
  162.        'fname' is the file to check and 'chksum' the original check sum. 
  163.        This mode will return an errorlevel of 1 if the match fails.
  164.  
  165.        EXAMPLE:
  166.  
  167.                ECHO OFF
  168.                CLS
  169.                CHKSUM CHKSUM.COM 1592
  170.                IF ERRORLEVEL 1 GOTO FAIL
  171.                GOTO XIT
  172.                :FAIL
  173.                ECHO Check sum does NOT match
  174.                BEEP
  175.                :XIT
  176.  
  177.        When running some programs, which modify themselves, such as our 
  178.        PWRD.COM file, you will have to run CHKSUM to get a new check 
  179.        sum, when the program is modified.
  180.  
  181.        EXAMPLE:
  182.  
  183.                CHKSUM PWRD.COM
  184.  
  185.        Generates the check sum 1526 when run the first time. After 
  186.        using the new password option, you must run the above syntax 
  187.        again to generate new checksum.
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                       3
  196.  
  197.                             S E B F U   Version 4.0
  198.  
  199.  
  200.                       (C) 1989-1991   Scanlon Enterprises
  201.  
  202.  
  203.  
  204.                         SUMMARY REFERENCE / USER GUIDE
  205.  
  206.  
  207.  
  208.  
  209.        CURSOR is the utility to set the cursor attributes, such as blink 
  210.        fast or slow, no blink, turn cursor off and to select which scan 
  211.        lines to use. Scan lines are the lines (rows) used to make a 
  212.        character, which is 9 for CGA systems. If you own Mono, EGA or 
  213.        VGA systems, the number of scan lines is different, and you 
  214.        should refer to your video system manual for the correct number.
  215.  
  216.        CURSOR allows you to select the cursor start and end scan lines, 
  217.        so that the cursor could look like this '_' or '─'. The standard 
  218.        cursor (on CGA) is set to use scan lines 6 & 7, which looks 
  219.        somewhat like the first case, but is two lines, one above the 
  220.        other.
  221.  
  222.        DLST is a small utility to display a five across (on CGA systems 
  223.        in 80 column text mode) directory listing, without displaying 
  224.        other file information like the DOS DIR command does. DLST 
  225.        automatically pauses when the screen is full (switch not 
  226.        required). You will be shipped an enhanced version of this, with 
  227.        even more features (see DLST.DOC) when you register.
  228.  
  229.        FNDHID will generate a list (which may be redirected) of all 
  230.        files which are hidden (invisible). The list also contains the 
  231.        other attributes, such as read only and system. The list begins 
  232.        with a directory name, followed by lines (indented) of file names 
  233.        and their attributes. Redirection may be used, by entering the 
  234.        following command at a DOS  prompt:
  235.  
  236.                FNDHID>PRN
  237.  
  238.        This syntax would then send the output to the printer.
  239.  
  240.  
  241.        FSIZE reports the size of all specified files (default is all 
  242.        files), the bytes required for all specified files to fit on a 
  243.        floppy disk and the bytes required to fit onto a hard drive. 
  244.        FSIZE also reports the total number of files, it found, matching 
  245.        the file specification specified.
  246.  
  247.        GETMCB reports on memory (conventional) usage. The list will 
  248.        contain any TSR name found, the size and segment where the TSR 
  249.        begins. By using this, you may get some idea of how much RAM 
  250.        those TSR's are using.
  251.  
  252.        HDTYPE reports what hard drive types are supported by your 
  253.        system. Both HDTYPE and GETMCB listings may be redirected, like 
  254.        the example shown with FNDHID.
  255.  
  256.        KILL0 deletes files which are empty (zero bytes). This will free 
  257.        up your directory entries, and help keep DOS running faster.
  258.  
  259.  
  260.                                       4
  261.  
  262.                             S E B F U   Version 4.0
  263.  
  264.  
  265.                       (C) 1989-1991   Scanlon Enterprises
  266.  
  267.  
  268.  
  269.                         SUMMARY REFERENCE / USER GUIDE
  270.  
  271.  
  272.  
  273.  
  274.        LOG is a utility to maintain and track computer usage. It's basic 
  275.        use is to log in and out, using the syntax LOG /I to log in and 
  276.        LOG /O to log out.  This syntax used from the AUTOEXEC.BAT file 
  277.        will maintain a log file, which can be used to show computer 
  278.        usage for IRS purposes.
  279.  
  280.        PAGE can be used with the /Sp option to set the video screen to a 
  281.        different page. This is handy, for instance, if you want to save 
  282.        a screen for later recall as a reference.
  283.  
  284.        PRINTC is your key to quickly sending print controls to the PRN 
  285.        device driver. Just provide a series of decimal numbers after the 
  286.        PRINTC command, and they will be issued to the PRN device.
  287.  
  288.        EXAMPLE:   PRINTC 27 77
  289.  
  290.        Will place your printer into 12 character per inch mode (this is 
  291.        the same as ESCAPE 'M' ....
  292.  
  293.        SV28 simply places your EGA or VGA system into 28 line mode.
  294.  
  295.        SWPRN will swap printer ports 1 and 2 (by default) or any other 
  296.        printer ports supported by DOS (up to 4). This can be used, for 
  297.        example prior to using PRINTC to select the second printer, to 
  298.        send control strings to.
  299.  
  300.        TD will display the current time and date at the current video 
  301.        location, or to an optional video location. Use instead of the 
  302.        DOS TIME or DATE function, to quickly display time and/or date.
  303.  
  304.        When you register, an enhanced doc file will be included, showing 
  305.        examples of the above uses, and some ideas for such use.
  306.  
  307.        All other SEBFU utilities are really designed for use from a 
  308.        batch file, even though they may work from the command line. For 
  309.        example, using LOCATE from the command line doesn't really help 
  310.        you much.
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.                                       5
  326.  
  327.                             S E B F U   Version 4.0
  328.  
  329.  
  330.                       (C) 1989-1991   Scanlon Enterprises
  331.  
  332.  
  333.  
  334.                         SUMMARY REFERENCE / USER GUIDE
  335.  
  336.  
  337.  
  338.        The balance of this document will be to give examples of using 
  339.        SEBFU as a complete product (using the utilities together). 
  340.        Utilities which are stand alone products will NOT be used unless 
  341.        such use enhances the use of another batch file utility. Many 
  342.        utilities will only be mentioned, as their usage is either simple 
  343.        or there is enough documentation in the functions DOC file.
  344.  
  345.  
  346.        BEEP is the utility to sound the speaker for a short time. 
  347.        Although this utility does NOT modify the tone (frequency), it is 
  348.        by far the most widely used utility and function used. Our 
  349.        version of this function offers some useful enhancements on this 
  350.        type of utility. The user can specify the number of beeps, such 
  351.        as:
  352.  
  353.                BEEP /+3
  354.  
  355.        Makes 3 short beeps .  The user can also space the beeps at one 
  356.        second intervals, or beep until a key stroke is detected.
  357.  
  358.  
  359.        EXAMPLE:
  360.  
  361.                ECHO OFF
  362.                CLS
  363.                {Some application is run automatically}
  364.                ECHO Application is finished
  365.                BEEP /D /K
  366.  
  367.        In this example, beeping continues at 1 second intervals until 
  368.        the user presses a key. Thus, you can have the batch file start 
  369.        some application which does NOT require user interaction, walk 
  370.        away and simply wait for the beeping.
  371.  
  372.        BIGLTR is really a utility for advertising, but can be used to 
  373.        announce something such as 'HANDS OFF', 'COMPUTER', 'IN USE'. 
  374.        Lets take this last usage and make an example out of it.
  375.  
  376.        EXAMPLE:
  377.  
  378.                ECHO OFF
  379.                CLS
  380.                {Start application as TSR (for modem stuff??)}
  381.                CLS
  382.                LOCATE 1 1
  383.                BIGLTR HANDS OFF
  384.                LOCATE 9 1
  385.                BIGLTR COMPUTER
  386.                LOCATE 17 1
  387.                BIGLTR IN USE
  388.                CR
  389.  
  390.                                       6
  391.  
  392.  
  393.                             S E B F U   Version 4.0
  394.  
  395.  
  396.                       (C) 1989-1991   Scanlon Enterprises
  397.  
  398.  
  399.  
  400.                         SUMMARY REFERENCE / USER GUIDE
  401.  
  402.  
  403.  
  404.  
  405.  
  406.        This example will start some TSR, possibly a modem communications 
  407.        system, display the message 'HANDS OFF COMPUTER IN USE' and wait 
  408.        until someone presses the ENTER key.
  409.  
  410.        We have also demonstrated the use of another of our utilities, 
  411.        the LOCATE command. LOCATE positions the cursor. In our example, 
  412.        we used it to position the cursor 3 times, prior to each use of 
  413.        the BIGLTR command. This is done, since BIGLTR uses the current 
  414.        cursor location to begin it's display. Finally, we end the batch 
  415.        file with another of our utilities, CR, which simply waits for 
  416.        the ENTER key to be pressed.
  417.  
  418.        CALCYR can be useful in verifying that a real time clock is 
  419.        operating correctly, or if one is even installed. The fundamental 
  420.        usage is to test a selected year from that reported by DOS.
  421.  
  422.        EXAMPLE:
  423.  
  424.                ECHO OFF
  425.                CLS
  426.                CALCYR 1980
  427.                IF ERRORLEVEL 1 GOTO XIT
  428.                ECHO DATE is NOT set
  429.                :XIT
  430.  
  431.        The above example compares the DOS derived year with 1980, and if 
  432.        they match, will generate an errorlevel of 0, which the batch 
  433.        file tests for. If the two years are different, then an 
  434.        errorlevel will be generated which is greater than 0. If this 
  435.        happens, then the line with IF ERRORLEVEL will pass control to 
  436.        the label XIT, which is the end of the batch file.
  437.  
  438.        CDCK, DETANSI, LIMCK, MOUSECK and XMSCK all are simple utilities 
  439.        which do NOT require options (command line options) to use. 
  440.        Simply enter the utility name, and an errorlevel of 1 will be 
  441.        returned if the device drive exists, otherwise the errorlevel 
  442.        will be 0.
  443.  
  444.        EXAMPLE:
  445.  
  446.                ECHO OFF
  447.                CLS
  448.                {Utility Name}
  449.                IF ERRORLEVEL 1 ECHO {Utility Name} is installed
  450.  
  451.  
  452.        The above is the basic usage. Alternately, the user could write 
  453.        the batch file to branch on an errorlevel of 1.
  454.  
  455.                                       7
  456.  
  457.  
  458.                             S E B F U   Version 4.0
  459.  
  460.  
  461.                       (C) 1989-1991   Scanlon Enterprises
  462.  
  463.  
  464.  
  465.                         SUMMARY REFERENCE / USER GUIDE
  466.  
  467.  
  468.  
  469.  
  470.  
  471.        CDD is a very useful utility, which can save several key strokes. 
  472.        Its use can be from the DOS command line or a batch file. CDD 
  473.        simply backs up some number of directories, toward the root. The 
  474.        user specifies the number of directories to back up. IE... if we 
  475.        enter CDD 3, we end up 3 levels back of where we were, which is 
  476.        just as though we had entered CD ..\..\..
  477.  
  478.        CHGLOCK is a utility which will change the state of 3 possible 
  479.        lock keys (CAPS LOCK, NUM LOCK & SCROLL LOCK). Although on an AT 
  480.        or 386 system the lights will change, reflecting the new state, 
  481.        PC/XT systems can NOT do this. This utility is useful for cases 
  482.        where the actual states have become different from the state the 
  483.        keyboard shows. Some applications do change the CAPS or NUM LOCK 
  484.        keys, but do NOT restore it.
  485.  
  486.        EXAMPLE:
  487.  
  488.                CHKLOCK C
  489.  
  490.        Toggles the caps lock to its alternate, if on, toggles it off. 
  491.        Replace the C in the above, with either N for num lock or S for 
  492.        scroll lock .
  493.  
  494.        CHKDRVR will test for 8 possible driver types, returning the 
  495.        appropriate errorlevel. (see CHKDRVR.DOC).
  496.  
  497.        CLRKEY is very useful, when used with our keyboard input 
  498.        routines, such as GALF. Use CLRKEY to clear the keyboard 
  499.        typeahead buffer when starting a keyboard input routine to assure 
  500.        that no key is in the typeahead buffer, this eliminates false 
  501.        entries.
  502.  
  503.        EXAMPLE:
  504.  
  505.                ECHO OFF
  506.                CLS
  507.                {Display a menu}
  508.                CLRKEY
  509.                GALF
  510.                {Do something based upon the errorlevel}
  511.  
  512.        This short file would get an alpha keystroke, after first 
  513.        clearing any existing key stroke from the type ahead buffer. GALF 
  514.        sets an errorlevel equal to the alpha key, where 1=A and 26=Z. 
  515.        GALF ignores alpha key case (upper or lower case is the same).
  516.  
  517.  
  518.  
  519.  
  520.                                       8
  521.  
  522.                             S E B F U   Version 4.0
  523.  
  524.  
  525.                       (C) 1989-1991   Scanlon Enterprises
  526.  
  527.  
  528.  
  529.                         SUMMARY REFERENCE / USER GUIDE
  530.  
  531.  
  532.  
  533.  
  534.        CR is a replacement for the DOS PAUSE command. CR does NOT allow 
  535.        any key stroke, instead beeping if any key other than the ENTER 
  536.        key is pressed. Alternately, the Escape and ^C can cause CR to 
  537.        exit to the next batch command.
  538.  
  539.        DFREE places the bytes on a specified drive, into a variable or 
  540.        will display the result. The size is specified as a whole number, 
  541.        in bytes. Thus 360K = 360000 .
  542.  
  543.        DRVLST places a list of drives into a variable. Use INSTR and MID 
  544.        to extract or find a specific drive.
  545.  
  546.        DSKRDY is a powerful testing system for floppy based systems. All 
  547.        results set an errorlevel, depending upon the result. This 
  548.        utility not only tests if a disk is installed or the drive is 
  549.        ready, but if the disk has been formatted as well.
  550.  
  551.        ENVSIZE is useful, to test the DOS environment space. We suggest 
  552.        you use this to test if there is space available for the 
  553.        variables which many of our utilities will set, prior to using 
  554.        the utility. An enhanced version of this, sent with registration 
  555.        of ENVSIZE or SEBFU, will test a matching value to the actual 
  556.        size, generating an errorlevel based upon the result, such as 
  557.        equal to, greater than or less than.
  558.  
  559.        FUNKEY is a utility which waits for a function key to be pressed, 
  560.        then exits with an errorlevel equal to the function key number of 
  561.        1 thru 10. The new function keys 11 and 12 are NOT tested for.
  562.  
  563.        GALF is one of our most useful keyboard input routines. This 
  564.        utility plus GETNUM allow for almost any possible menu system to 
  565.        be created. If we have the following menu in the file MENU
  566.  
  567.        MENU:
  568.  
  569.                A) Word-processing
  570.                B) Accounting
  571.                C) Checking System
  572.                D) UTILITIES
  573.                E) GAMES
  574.  
  575.        And a second menu with 
  576.  
  577.        MENU2:
  578.  
  579.                1) Wordstar
  580.                2) WordPerfect
  581.                3) MicroSoft Word
  582.                0) Main Menu
  583.  
  584.  
  585.                                       9
  586.  
  587.                             S E B F U   Version 4.0
  588.  
  589.  
  590.                       (C) 1989-1991   Scanlon Enterprises
  591.  
  592.  
  593.                         SUMMARY REFERENCE / USER GUIDE
  594.  
  595.  
  596.        We could create the following batch file
  597.  
  598.        EXAMPLE:          Batch file name is MENU.BAT
  599.  
  600.                ECHO OFF
  601.                WINDOW 1 1 1 80 /F14 /B4
  602.                LOCATE 1 36
  603.                WRITE M E N U
  604.                WINDOW 2 1 25 80 /F7 /B1
  605.                LOCATE 3 1
  606.                WRITEF MENU
  607.                GOTO LP2
  608.                :LP1
  609.                BEEP
  610.                :LP2
  611.                GALF
  612.                IF ERRORLEVEL 6 GOTO LP1
  613.                IF ERRORLEVEL 5 GOTO GAMES
  614.                IF ERRORLEVEL 4 GOTO UTIL
  615.                IF ERRORLEVEL 3 GOTO CHK
  616.                IF ERRORLEVEL 2 GOTO ACNT
  617.                IF ERRORLEVEL 1 GOTO MENU2
  618.                GOTO XIT
  619.                :GAMES
  620.                {Do a games menu ?}
  621.                MENU
  622.                :UTIL
  623.                {Menu of utilities}
  624.                MENU
  625.                :CHK
  626.                QUICKEN
  627.                MENU
  628.                :ANCT
  629.                LOTUS
  630.                MENU
  631.                :MENU2
  632.                WINDOW 2 1 25 80 /F7 /B1
  633.                LOCATE 3 1
  634.                WRITEF MENU
  635.                GETNUM 0123
  636.                IF ERRORLEVEL 3 GOTO WS
  637.                IF ERRORLEVEL 2 GOTO WP
  638.                IF ERRORLEVEL 1 GOTO MS
  639.                MENU
  640.                :WS
  641.                WS
  642.                MENU
  643.                :WP
  644.                WP
  645.                MENU
  646.                :MS
  647.                WORD
  648.                MENU
  649.  
  650.                                       10
  651.  
  652.                             S E B F U   Version 4.0
  653.  
  654.  
  655.                       (C) 1989-1991   Scanlon Enterprises
  656.  
  657.  
  658.  
  659.                         SUMMARY REFERENCE / USER GUIDE
  660.  
  661.  
  662.  
  663.  
  664.        The above batch file (MENU.BAT) is only a basic example of what 
  665.        you could create in making a menu, using a batch file. I have 
  666.        created batch files with several hundred command lines, which 
  667.        give my clients very powerful menus. Many of my customers rarely 
  668.        use a DOS prompt, but never by expensive menu systems !
  669.  
  670.        Notice our use of several SEBFU commands, and extensive use of 
  671.        the batch file ERRORLEVEL function. SEBFU is one of the few 
  672.        utilities written especially to use this very powerful DOS 
  673.        feature. Our first function used, is WINDOW , which clears a 
  674.        portion of the display to a selected color (yellow on red). This 
  675.        is definitely something DOS commands do NOT offer.
  676.  
  677.        Next, we position the cursor to line 1, about the middle, so we 
  678.        can display the title 'M E N U' centered. A utility to center 
  679.        text on a line is included with registration of SEBFU. An 
  680.        advantage of WRITE is the ability to use existing screen colors 
  681.        to display the text, which is what the WINDOW command did.
  682.  
  683.        Another WINDOW command clears the rest of the display (thru line 
  684.        25), to white on blue. We then use the LOCATE command to position 
  685.        the cursor at the 3rd line and display our first menu, using the 
  686.        WRITEF command (available to registered users). We use this, 
  687.        since it also uses existing colors to display text. If you do NOT 
  688.        have WRITEF, create a sequence of WRITE and LOCATE statements to 
  689.        place the menu lines into the batch file.
  690.  
  691.        The GOTO branches to the keyboard input function GALF, which 
  692.        waits for alpha keys. The first errorlevel tested for is a 6, 
  693.        which corresponds to F, which is NOT a menu choice, thus we 
  694.        branch to the label LP1 which simply beeps the speaker and 
  695.        restarts GALF.
  696.  
  697.        Testing for errorlevels 1 thru 5 cause the batch file to branch 
  698.        to the label following the GOTO. The line following the last 
  699.        errorlevel test is arrived at when the user presses the ESCAPE or 
  700.        ^C, this is how we exit the menu. The user may include text, in 
  701.        the menu, letting the user know how to get a DOS prompt. 
  702.        Normally, since we only want qualified persons at a DOS prompt in 
  703.        a business, we don't place this information into the batch file, 
  704.        but instead let those who need such access, have the information 
  705.        directly. Following the batch file down to the label MENU2, we 
  706.        present the second menu type using our GETNUM function.
  707.  
  708.        GETNUM does NOT automatically exit with the ESCAPE or ^C so we 
  709.        place the 0 as a menu choice to exit to the main menu. Once 
  710.        GETNUM has functioned, the balance of the batch file is just like 
  711.        the commands following the GALF command.
  712.  
  713.  
  714.  
  715.                                       11
  716.  
  717.                             S E B F U   Version 4.0
  718.  
  719.  
  720.                       (C) 1989-1991   Scanlon Enterprises
  721.  
  722.  
  723.  
  724.                         SUMMARY REFERENCE / USER GUIDE
  725.  
  726.  
  727.  
  728.  
  729.        If you want to know the current location of the cursor, you can 
  730.        use our GCURS function, which will return either the row, column 
  731.        or both. GDIR is a very powerful function, and can be used to 
  732.        change directories automatically.
  733.  
  734.        EXAMPLE:
  735.  
  736.                ECHO OFF
  737.                CLS
  738.                GDIR LEV1
  739.                CD \WORD
  740.                WORD
  741.                CD %LEV1%
  742.  
  743.        Although we used the variable, LEV1, any variable name may be 
  744.        used. Since, any variable can be used, the user could save 
  745.        several of these and return to one at any time.
  746.  
  747.        GDRIVE is a power aid to batch file execution. We can save the 
  748.        drive in any valid DOS variable. Thus, between GDIR and GDRIVE, 
  749.        we know the drive and directory of previous events.
  750.  
  751.        EXAMPLE:
  752.  
  753.                ECHO OFF
  754.                CLS
  755.                GDIR DIR1
  756.                GDRIVE DRV1
  757.                D:
  758.                GDIR DIR2
  759.                CD\WORD
  760.                WORD
  761.                CD %DIR2%
  762.                %DRV1%:
  763.                CD %DIR1%
  764.                SET DRV1=
  765.                SET DIR1=
  766.                SET DIR2=
  767.  
  768.        In this example, we save both the current drive and path in 
  769.        variables DIR1 and DRV1, plus the current directory of the drive 
  770.        we change to. In this way, we preserve both paths and return back 
  771.        to the originating drive and directory at the conclusion of the 
  772.        application (WORD). 
  773.  
  774.        ** An important note, GDRIVE does NOT add a colon to the drive 
  775.        letter, thus when specifying the drive (line before CD %DIR1%), 
  776.        be sure to add the color as we did. **
  777.  
  778.  
  779.  
  780.                                       12
  781.  
  782.                             S E B F U   Version 4.0
  783.  
  784.  
  785.                       (C) 1989-1991   Scanlon Enterprises
  786.  
  787.  
  788.  
  789.                         SUMMARY REFERENCE / USER GUIDE
  790.  
  791.  
  792.  
  793.  
  794.  
  795.        GETCOLR will return an errorlevel or set an environment variable 
  796.        equal to the color at the current cursor location. When using the 
  797.        errorlevel mode GETCOLR will automatically return an errorlevel 
  798.        equal to the foreground color. If the back ground color is 
  799.        desired as an errorlevel, use the option switch '/B'. Both values 
  800.        may be returned in variables with the use of the option switch 
  801.        '/V'. This switch causes both values to be placed into separate 
  802.        variables, FCOL for foreground and BCOL for background.
  803.  
  804.        GETVER returns the current DOS version. IE... if the Dos version 
  805.        is 3.x then GETVER returns 3, for 2.x returns 2, etc...
  806.  
  807.        GETVER will return the minor portion of the DOS version by 
  808.        appending the option switch '/M', IE... 3.2 returns 2, 3.3 
  809.        returns 3, etc...... IF you wish the entire version number, you 
  810.        can place this into a variable called VER by using the option 
  811.        switch '/V'.
  812.  
  813.        GEXT waits for extended key entries. To use this correctly, you 
  814.        will have to refer to the DOS scan code reference chart, or scan 
  815.        code reference chart which came with your keyboard, as GEXT 
  816.        returns an errorlevel equal to the scan code of the key pressed. 
  817.        If a key other than an extended key is pressed, GEXT will beep. 
  818.        Extended keys are keys such as function keys, page and arrow 
  819.        keys, insert & delete, home and end.
  820.  
  821.        Registered version brings details on extended key codes.
  822.  
  823.        GMEM will display the total available conventional ram, or by 
  824.        using an optional switch, '/R', display the bytes remaining. 
  825.        Also, the user may specify the use of a variable by using the 
  826.        option switch '/V', which places the value into the variable RAM
  827.  
  828.        GSMODE can change your video mode, yes, even to graphics mode. 
  829.        Now you can change to graphics mode, even from a dos prompt. 
  830.        Additionally, GSMODE will return an errorlevel equal to the 
  831.        current video mode. This feature, along with the ability to set 
  832.        the mode, is very useful when running some games. The following 
  833.        example will demonstrate how to use this powerful command.
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.                                       13
  846.  
  847.                             S E B F U   Version 4.0
  848.  
  849.  
  850.                       (C) 1989-1991   Scanlon Enterprises
  851.  
  852.  
  853.  
  854.                         SUMMARY REFERENCE / USER GUIDE
  855.  
  856.  
  857.        EXAMPLE:
  858.  
  859.                ECHO OFF
  860.                CLS
  861.                GSMODE
  862.                FOR %%F IN (1237) DO IF ERRORLEVEL %%F SET MODE=%%F
  863.                GAME
  864.                GSMODE
  865.                IF ERRORLEVEL 8 GOTO GRPH
  866.                IF ERRORLEVEL 7 GOTO XIT          {MONO ?}
  867.                IF ERRORLEVEL 4 GOTO GRPH
  868.                GOTO XIT
  869.                :GRPH
  870.                GSMODE %MODE%
  871.                :XIT
  872.  
  873.        The 3rd line gets the current mode, which is then saved in 
  874.        variable MODE on line 4. Line 5 executes the game, 7 gets the 
  875.        mode after executing the game. The next 3 lines check if we are 
  876.        in graphics or monochrome, or exit if in color text mode. Two 
  877.        errorlevel tests branch to GRPH which will restore the video mode 
  878.        to the correct mode. Of course, we could have simply left the 
  879.        testing out, and restored whatever mode was in effect prior to 
  880.        starting the game. We did NOT do this, as many menu systems use 
  881.        graphics (such as WINDOWS).
  882.  
  883.        INKEY is a very powerful input routine, as it sets an errorlevel 
  884.        for any keystroke, which is NOT an extended key, to the ascii 
  885.        value of the key pressed. IE... if 'a' is pressed, the ascii 
  886.        value is 97, while 'A' is 65 and a space is 32.
  887.  
  888.        INSTR and MID can be used together or separately. One, INSTR, 
  889.        will find the position in a variable, of a specified character, 
  890.        while the other extracts a portion of a variable.
  891.  
  892.        EXAMPLE:
  893.  
  894.        ECHO OFF
  895.        CLS
  896.        INSTR PATH /C:
  897.        FOR %%F IN (1 2 3 4 5 6 7 8 9) DO IF ERRORLEVEL %%F SET P=%%F
  898.        MATH /-1 /VP
  899.        MID %P% 2 PATH DRV
  900.  
  901.        The above will place the name of the first drive found in the 
  902.        PATH string, since each drive is appended with a color. The line 
  903.        containing INSTR finds the position of the first colon, while the 
  904.        following line sets variable P equal to the result. MATH is our 
  905.        utility to subtract or add values to variables, in this example, 
  906.        we subtract 1 from P, to obtain the drive letter position. The 
  907.        last line places the 2 characters, drive letter and colon into 
  908.        variable DRV.
  909.  
  910.                                       14
  911.  
  912.                             S E B F U   Version 4.0
  913.  
  914.  
  915.                       (C) 1989-1991   Scanlon Enterprises
  916.  
  917.  
  918.  
  919.                         SUMMARY REFERENCE / USER GUIDE
  920.  
  921.  
  922.  
  923.  
  924.        INVERT will reverse the foreground and background colors, IE.. if 
  925.        the foreground is white and background is blue, then INVERT will 
  926.        change the background to white and foreground to blue.
  927.  
  928.        KEYSTAT tests for various special keyboard flags, such as shift, 
  929.        control, caps lock, insert, etc..... This can be used to give 
  930.        special meaning to our input routines, such as GALF or INKEY.
  931.  
  932.        KSTAT is slightly different from KEYSTAT, in that it tests for 
  933.        any key being pressed, returning an errorlevel of 1 if a 
  934.        standard key has been pressed, or 2 if an extended key is 
  935.        pressed, and 0 if none has been pressed. With this utility, we 
  936.        can cause a batch file to perform tasks until a key is pressed.
  937.  
  938.        LCASE is a utility to convert all characters in a variable to 
  939.        lower case. UCASE performs the opposite task.
  940.  
  941.        LEN is a utility to get the length of any variable, to an 
  942.        errorlevel. This is useful when displaying variables, and you 
  943.        know the cursor is NOT at the end of a line.
  944.  
  945.        LINE will draw lines, up to 255 characters in length, using 
  946.        various text characters, including the line drawing characters in 
  947.        the extended character set.
  948.  
  949.        LOG is a computer logging system, and can be used to develop IRS 
  950.        tracking records of your computer usage.
  951.  
  952.        MOVCUR is a power cursor location utility, which moves the cursor 
  953.        in the desired direction, relative from its current position. 
  954.        IE... if you wanted to move up 5 lines, and the cursor is at line 
  955.        8, column 10, then the cursor would move to line 3, column 10.
  956.  
  957.        PATHCK can verify the existence of a specified path. This can be 
  958.        useful to avoid the DOS 'path not found' message.
  959.  
  960.        PFF simply sends the printer a form feed.
  961.  
  962.        PRDY returns an errorlevel based on the printer status, where a 
  963.        zero indicates everything is ok.
  964.  
  965.        PRINTC is a powerful enhancement to any DOS batch file. Set a 
  966.        batch file with lines containing setup strings for various 
  967.        printer modes, the call the batch file with the selected 
  968.        function.
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.                                       15
  976.  
  977.                             S E B F U   Version 4.0
  978.  
  979.  
  980.                       (C) 1989-1991   Scanlon Enterprises
  981.  
  982.  
  983.  
  984.                         SUMMARY REFERENCE / USER GUIDE
  985.  
  986.  
  987.  
  988.  
  989.        EXAMPLE:                    PMODE.BAT
  990.  
  991.                ECHO OFF
  992.                CLS
  993.                IF %1*==* GOTO HELP
  994.                IF %1==1 GOTO PICA
  995.                IF %1==2 GOTO ELITE
  996.                IF %1==3 GOTO LM
  997.                ECHO Invalid option
  998.                :HELP
  999.                ECHO Usage PMODE 1 {Pica mode}
  1000.                ECHO       PMODE 2 {Elite mode}
  1001.                ECHO       PMODE 3 l (left margin value)
  1002.                GOTO XIT
  1003.                :PICA
  1004.                PRINTC 27 80
  1005.                GOTO XIT
  1006.                :ELITE
  1007.                PRINTC 27 77
  1008.                GOTO XIT
  1009.                :LM
  1010.                PMODE 27 108 %2
  1011.                :XIT
  1012.  
  1013.        Although in this example, we have only 3 choices, the batch file 
  1014.        could contain dozens of them, instead. Our first PRINTC use, to 
  1015.        set PICA mode is ESCAPE (27) and "M" (80), the second use sets 
  1016.        the printer to elite and the final, requires a second value. 
  1017.        Notice our test early in the batch file of %1*==*, this is a 
  1018.        typical way to check if a parameter is available. If %1, the 
  1019.        first command line parameter, is empty, this result of the test, 
  1020.        is that %1 (the variable) plus "*" is equal to just "*" ! When 
  1021.        this is the case, we branch to our label HELP, which displays the 
  1022.        usage and exits.
  1023.  
  1024.        PRNSET will cause a hardware reset to the attached printer, 
  1025.        provided the printer supports this capability.
  1026.  
  1027.        PWRD is a password system, and PWRD.DOC provides enough 
  1028.        information on usage. This utility is very useful, and could be 
  1029.        included as the first command (line 1) of the AUTOEXEC.BAT file.
  1030.  
  1031.        RESP is a very powerful utility, as it allows inputting several 
  1032.        keystrokes at one time. The utility can be used as a low level 
  1033.        password system by selecting the no echo option. With this, the 
  1034.        user can select functions, drives, paths or most anything from a 
  1035.        batch file. We can even ask the user their name.
  1036.  
  1037.  
  1038.  
  1039.  
  1040.                                       16
  1041.  
  1042.                             S E B F U   Version 4.0
  1043.  
  1044.  
  1045.                       (C) 1989-1991   Scanlon Enterprises
  1046.  
  1047.  
  1048.  
  1049.                         SUMMARY REFERENCE / USER GUIDE
  1050.  
  1051.  
  1052.  
  1053.  
  1054.        ROWS checks your system for the number of rows available on the 
  1055.        video device. This is useful when placing information on EGA or 
  1056.        VGA systems, since they can have more than 25 !
  1057.  
  1058.        SAVEKEY is very powerful. Now, you can have your batch file pass 
  1059.        commands to your application. SAVEKEY places a string, of up to 
  1060.        16 characters, into the keyboard type ahead buffer. Thus, for any 
  1061.        application allowing type ahead, we can move past, say an opening 
  1062.        screen, select a file to edit, and more..
  1063.  
  1064.        SCRLMSG  will scroll a message, of any length supported by the 
  1065.        DOS command line, from right to left on the current cursor line. 
  1066.        The line can first be cleared, using our WINDOW utility. This is 
  1067.        great, for menus with a scrolling message, while waiting for a 
  1068.        key stroke. SCRLMSG exits after any key press.
  1069.  
  1070.        SDATE is an easy to use utility to set the DOS date, which may be 
  1071.        needed after running some games or applications. STIME is the 
  1072.        utility to set the time.
  1073.  
  1074.        SETERR is used to set an errorlevel, which may be required by 
  1075.        some applications.
  1076.  
  1077.        SOUND is a little utility to make various noises. You select the 
  1078.        duration (up to several seconds) and the tone (frequency). Use 
  1079.        this to replace the flat beep of our BEEP utility. Useful to 
  1080.        announce error conditions, etc....
  1081.  
  1082.        STRING is a utility to display one character as a string, IE... 
  1083.        STRING /CA /L5  will display a string of 5 'A' s......
  1084.  
  1085.        PSTRING is does the same as STRING, but the string is printer, 
  1086.        rather than displayed.
  1087.  
  1088.        SWIDTH finds the width of the video system (number of usable 
  1089.        columns). This is useful when dealing with VGA or EGA systems 
  1090.        which can support 90 or more columns.
  1091.  
  1092.        TC is a utility to hide or un-hide the cursor.
  1093.  
  1094.        TD will display the date and/or time at a specified position, or 
  1095.        at the current cursor location.
  1096.  
  1097.        WAIT is used to pause a batch file just after displaying a 
  1098.        message, or to pause prior to doing something.
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.                                       17
  1106.  
  1107.                             S E B F U   Version 4.0
  1108.  
  1109.  
  1110.                       (C) 1989-1991   Scanlon Enterprises
  1111.  
  1112.  
  1113.  
  1114.                         SUMMARY REFERENCE / USER GUIDE
  1115.  
  1116.  
  1117.  
  1118.  
  1119.        WDATE and WTIME are the utilities to get the current date and 
  1120.        time, as DOS knows it. These can be used in a batch file to run 
  1121.        special applications at specified times or dates.
  1122.  
  1123.        WINDOW is our handy screen clearing utility. WINDOW will clear 
  1124.        any portion (including all) to any color values (foreground and 
  1125.        background), or scroll any portion of the display up or down.
  1126.  
  1127.        WRITE is our replacement for the ECHO command, and is more useful 
  1128.        in some instances, such as when color is required, or at least 
  1129.        desired. This utility will also write messages (strings) to other 
  1130.        video pages (if supported), thus by using our PAGE utility to 
  1131.        switch between pages, we can view the message. Also we can 
  1132.        display parts of a message on the same line.
  1133.  
  1134.        YN is a simple little utility to simply wait for yes/no responses 
  1135.        using the single key response of y/n ('y' or 'n'). YN responds to 
  1136.        either upper or lower case with the same result.
  1137.  
  1138.        This concludes the documentation for SEBFU shareware version. For 
  1139.        details on registering SEBFU and what your registration brings, 
  1140.        please read ORDSEBFU.DOC . Registering SEBFU  is really a 
  1141.        bargain.
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.                                       18
  1171.