{
                        {USING THE SCRIPT COMPILER
                        {=========================

{  Creating or Changing Scripts
{  ============================

       To create a new script or change an existing one, you can use your
       own text editor, the Windows Notepad utility, or the editor
       supplied with the Script Compiler.  All scripts must be saved in
       ASCII (text) format.  It is recommended that you use the Script
       Compiler editor because you can edit and compile scripts from
       within it.

       {Note...}     Your scripts can contain up to 100 lines of
                   executable commands, excluding comments and blank
                   lines.

{    Using the Script Editor to Build Scripts
{    ----------------------------------------

       To use the Script Compiler editor to create or change your script,
       do the following:

           1. Start the Script Compiler by selecting the "Script Compiler"
              icon in the "LANtastic for TCP/IP" window.

           2. To create a new script, select "New" from the "File" menu.

              To change an existing script, select "Open" from the "File"
              menu.  Then select the file you want to use from the dialog
              box that appears.  The "Script" edit window appears.

       At this point you can type your own commands into the script, use
       the "Command" menu to build your script, and copy commands from
       another script into your script.  Refer to the sections that
       follow for instructions on how to use the "Command" menu or other
       scripts to build your script.

           3. When you have finished building your script, select "Save"
              or "Save As..." from the "File" menu.

              The script will be saved with a ".SCI" extension.

              If the script compiles successfully, then the output file
              will have the same name but with the extension ".SCO".

{    Using the Command Menu to Build Your Script
{    -------------------------------------------

       The "Command" menu selections provide an easy way to enter your own
       variables and arguments for every command used in your script.  You
       can type script commands into your script or use the "Command" menu
       to guide you in supplying the correct syntax.  To use the "Command"
       menu selections to build your scripts, complete the following
       steps:

           1. To create a new script, select "New" from the "File" menu.

              To change an existing script, select "Open" from the "File"
              menu.  Then select the file you want to use from the dialog
              box that appears. The "Edit" window appears.

           2. Select the command you want to use from the "Command" menu.

              A dialog box appears, showing the syntax of the command.
              You may have to scroll to the right to see the complete
              syntax.

           3. Enter your variables and arguments into the entry fields at
              the top of the dialog box or into the insertion field at
              the bottom of the dialog box.

           4. When you have finished entering your variables and
              arguments, click "OK" to add the customized command line to
              your script input file.

       See the COMMAND REFERENCE section in this update manual for brief
       descriptions, syntax, and examples of the Script Compiler commands.

{    Copying and Pasting Scripts
{    ---------------------------

       You can use the "Cut," "Copy" and "Paste" commands from the "Edit"
       menu to copy and paste text from one script file into another
       script file.  To use these commands, do the following:

           1. Start the Script Compiler by selecting the "Script Compiler"
              icon in the "LANtastic for TCP/IP" window.

           2. To create a new script, select "New" from the "File" menu.
              To change an existing script, select "Open" from the "File"
              menu.  Then select the file you want to use from the dialog
              box that appears.  The "Edit" window appears.

           3. Select "Open" from the "File" menu.

           4. Select the file from which you want to cut or copy text. The
              file you selected appears in another edit window.

           5. Highlight the portion of the text you want to use.  You can
              click the mouse at the beginning of the text you want to
              select, then drag the mouse to select the rest of the text.

           6. Select "Copy" from the "Edit" menu.

           7. Click on the editor window to which you want to cut or copy
              the highlighted text.

           8. Move the blinking cursor to the place in the file where you
              want to paste the text.

              o The text will be pasted beginning at the point where the
                cursor is.  If you want the text to be pasted on a line by
                itself, make sure the cursor is on a blank line before
                selecting "Paste."

              o To insert a blank line press {Enter}.

              o To delete a line, highlight the line, then press {Delete}.

              o Use the {Up} and {Down} arrow keys to move to where you
                want to paste the highlighted text.

           9. Select "Paste" from the "Edit" menu to place the text at the
              current insertion point.

          10. To clear text from a window, highlight the text you want to
              remove, then select "Clear" from the "Edit" menu (or press
              {Delete}).

{  Storing Script Output Files
{  ===========================

       If you want to store your compiled script in a directory other than
       the default or current directory, complete the following steps:

           1. Choose "Select Output Directory" on the "Compile" menu.
              Table 1 gives brief descriptions of the buttons and fields
              on the "Select Output Directory" dialog box.

   
            {Table 1. Select Output Directory menu selections}
     Ŀ
       Selection         Description                                   
     Ĵ
      Select Current    Your script output file will be placed in the  
      Directory button  directory whose path is displayed below this   
                        button. Clicking this button closes the dialog 
                        box.                                           
     Ĵ
      Path              Displays the levels of disks or filenames that 
                        will contain the file. A pathname is separated 
                        by backslashes; for example:                   
                        {C:\LANTCP\scr_out\call.sco}.                    
     Ĵ
      Parent button     Takes you up one level in the directory        
                        hierarchy shown in path, and displays the      
                        contents of that directory in the selection    
                        list.  Note that only directories are listed.  
     Ĵ
      List box          Displays the contents of the currently         
                        selected directory.                            
     Ĵ
      New dir field     Fill in the name of a new directory for the    
                        compiled file.  Then click the "New" button.   
     Ĵ
      Open button       Displays the contents of the highlighted disk  
                        in the list box and adds it to the path.       
     Ĵ
      New button        Creates a directory with the name specified in 
                        the "New Dir" field and adds it to the list    
                        box. The new directory is created as a         
                        subdirectory of the current directory shown in 
                        the "Path" field.                              
     Ĵ
      Choose button     After you highlight a disk in the list box,    
                        the "Choose" button specifies the disk in      
                        which to place your script output files, and   
                        then closes the dialog box.                    
     Ĵ
      Cancel button     Closes the dialog box.                         
     

       {Note...}     Any change you make to the "Select Output Directory"
                   dialog box will be displayed the next time you
                   display it.

       The name of the default directory appears at the top of the dialog
       box.  The default directory for script input and output files is
       {C:\LANTCP}.

           2. Click on "Parent" to move up one directory level in the
              hierarchy.

           3. To list the contents of a particular directory, highlight
              that directory in the selection list, then click "Open."
              You can also double-click on a directory name to open that
              directory and display its contents.  You can also open a
              drive and display its contents by double-clicking on it.

           4. When the directory pathname you want to store your script in
              appears at the top of the dialog box, select "Select Current
              Directory."  Your compiled script files will be stored in
              this directory until you change it.  You are returned to the
              Script edit window so you can proceed to compile your
              script.

{    Creating a New Directory
{    ------------------------

       To create a new directory in which to store your script output
       files, first select the directory in which you want to place your
       new destination directory.

           1. Enter the new directory name in the "New Dir" field at the
              bottom of the dialog box.  Click "New."  The new directory
              name will display in the selection list.

           2. If you want to store your script output files in the
              directory you just created, click the "Choose" button.  All
              script output files will be stored in this directory until
              you specify a new one.  You are returned to the Script edit
              window so you can proceed to compile your script.

{  Compiling Scripts
{  =================

           1. Click on the edit window that contains the script you want
              to compile.  (You can also make a window active by selecting
              the script input filename from the Window menu.)

           2. Select "Compile" from the "Compile" menu, or press {Alt+G}.
              A message appears indicating whether your script compiled
              successfully.  If there are no errors, you are ready to run
              the compiled script.  If there are errors, refer to
              "Correcting Compiling Errors" later in this section.

       If your script compiles successfully, a status message displays,
       indicating that the script compiled with zero errors.  Also shown
       is the the directory where the script output file was stored.  The
       output file has the same name as the script but with the extension
       ".SCO".

{    Correcting Compiling Errors
{    ---------------------------

       If the Script Compiler finds errors while compiling your script,
       the "Compiler Error Message" dialog box and the "Compiler Error
       Handler" are displayed.  The "Compiler Error Message" dialog box
       shows the number of errors found and indicates that the output
       file was not created.

       The "Compiler Error Handler" displays a list of errors, the line
       each error occurred on and a description of each error to aid you
       in debugging your script.

       Table 2 provides brief descriptions of the buttons on the "Error
       Handler" dialog box.

                    {Table 2. Error Handler dialog box}
    Ŀ
     Selection         Description                                   
    Ĵ
     List box          Displays the total number of errors and       
                       displays each error message and the line of   
                       the script file in which it occurred.         
    Ĵ
     Next button       Highlights the next error in the list box and 
                       highlights the line in the script file that   
                       contains the error.                           
    Ĵ
     Prev button       Highlights the previous error in the list box 
                       and highlights the line in the script file    
                       that contains the error.                      
    Ĵ
     Done button       Closes the dialog box.                        
    

       To correct compiler errors in your script, follow these steps:

           1. Click "OK" to remove the error message.

           2. Double-click on an error in the "Compiler Error Handler"
              dialog box.  The line in the script file that contains the
              error will be highlighted also.

           3. Correct the errors in your script file.  Refer to the
              "Command" menu for descriptions of script command syntax, or
              refer to the COMMAND REFERENCE section of this update
              manual for descriptions and examples of these script
              commands.

           4. Click "Next" or "Previous" in the "Compiler Error Handler"
              window to highlight the next error or the previous error
              message.  You can also use the "Next Error" and "Previous
              Error" selections on the "Compile" menu.  Continue to go
              through all the errors, correcting them as you go.

           5. When you have finished correcting the errors, select "Done"
              from the "Compiler Error Handler" menu to remove the
              "Compiler Error Handler" dialog box from the screen.

           6. Recompile the script as described in "Compiling Scripts"
              earlier in this section.

{  Running Scripts
{  ===============

       You can set up a script to run when you open a terminal session, or
       you can run a script from within a current terminal session.
       Scripts that run when you open a terminal session perform an
       automated log-in and may perform other functions after a successful
       log-in.

{    Setting Up a Script to Automatically Log In
{    -------------------------------------------

       To set up a compiled script (".SCO" file) to run when you open a
       terminal session, do the following:

           1. If it is not already opened, start LANtastic for TCP/IP by
              double-clicking the icon in the "LANtastic for TCP/IP"
              window.

           2. Select "Options..." from the "Commands" menu.  The "TELNET
              Options" dialog box appears.

           3. Select the "Script" button to list the executables (".SCO"
              files).

           4. Click the "Script" button to display a selection list of
              script output files in the default directory.  If you have
              stored some script input and output files in a non-default
              directory, use the selection list to display the directory
              containing the script you want to run.

           5. Select the script output file that you want to run the next
              time you connect to a particular remote host, then click
              "Open." The script you select should contain a login
              procedure.

{    Running Scripts during a Terminal Session
{    -----------------------------------------

       Follow the steps below to run any compiled script after a session
       has been opened.  Refer to "Setting Up a Script to Automatically
       Log In" for information on how to run scripts that contain
       automated log-in commands.

           1. Start LANtastic for TCP/IP by selecting the "LANtastic for
              TCP/IP" icon in the "LANtastic for TCP/IP" window.  Then
              open a terminal session to the remote host.

           2. Select "Run Script..." from the "Commands" menu after you
              have logged in.

           3. A selection list of script output files is displayed.  The
              default directory for script output files is {C:\LANTCP}.

              If your script output files are located in a non-default
              directory, you can use the selection list to locate the
              directory that contains the scripts.

              Select the particular script file you want to run within the
              current session. The script will execute.

{    Aborting Scripts
{    ----------------

       To stop a script from running, select "Abort Script" from the
       "Commands" menu to stop the script.

{  Using Variables with the Script Compiler
{  ========================================

       The Script Compiler supports three types of variables:

       {A user-defined variable}.  A user-defined variable is either a
       string variable or an integer variable.  You can define a string or
       integer variable with the {STRING} or {NUM} command.

       When defining variables, there are certain rules that apply.  The
       name of the variable must take the following form:

           o The first letter must be a character in the alphabet; for
             example, a through z.  The next several characters can
             be either a letter from a through z, a digit between 0 and
             9, an underscore, a period (.), or any combination of the
             above.  Examples of valid names are:  {string1}, {num1},
             {my_name}, {test.txt}.  Examples of ~invalid` names are:
             {1num}, {_name}, {.wrk}.

           o The maximum number of variables that can be used in a script
             is 20.

       {System variables}.  There are currently two system variables:

           o The {SYS_USERNAME} variable always refers to the string you
             type into the "User Name:" field on the "New Terminal
             Session" dialog box in LANtastic for TCP/IP.

           o The {SYS_PASSWORD} variable always refers to the string you
             type into the "Password:" field on the "New Terminal Session"
             dialog box in LANtastic for TCP/IP.

       {Variables used by a called script}. Variables are used by a called
       script to refer to arguments that are passed to it by the calling
       script.  These are referred to as P0 through P9 by the called
       script.
