//      This text is Telix Salt script language that can be used to
//      create automatic logon scripts that will incorporate the
//      autocap and showname functions described in the separate
//      salts of each name included in this archive.
//
//      Showname is created by Slearn, but the only part of the
//      script you need that Slearn creates is the section that does
//      the actual logon! (Runlogon.Txt includes the same Showname function).
//
//      To use this properly, edit the script created by Slearn, deleting
//      everything except the lines doing the actual logon.
//
//      Edit those remaining lines to change the string
//              "return;"       to      "goto quit;"
//
//      Save the remaining section using another temporary filename,
//      i.e. logon.txt
//
//      Now create your complete logon.slt using the following DOS
//      command.
//
//      copy newlogon.txt + logon.txt + runlogon.txt logon.slt
//
//      Delete the temporary file logon.txt and rename the new logon.slt
//      to whatever filename Slearn inserted into your dialing directory
//      as the associated script filename for that entry.
//
//      That's It!  Now your automatic logon script will log you onto
//      the system, start a capture file, and pause the capture file as
//      soon as the logon procedure is completed.  When you terminate the
//      connection, the capture file will automatically be closed.
//
//      I have found this capture of my logon on procedure to be a great
//      help my logon scripts fail to run properly, usually when a SysOp
//      changes his system setup to display more/less screens, etc.
//      By comparing the capture of my last logon to the logon.slt script,
//      I can easily change the logon.slt to incorporate the necessary
//      changes.
//
    capture ("*PAUSE*");           // Pause the capture file after logon.
    while (carrier())              // Continue as long as you are online.
    {
        terminal();
    }
//  Went offline, so now we do some housekeeping.
    quit: capture ("*CLOSE*"); update_term();
}
showname()
//  Puts the first 14 characters of the entry name in the space occupied
//  by the 'Alt-Z for Help' prompt.
//
//  This is the same function Slearn creates, with comments and a LOT of
//  extra space deleted, but is otherwise unchanged.  
{
    str name[14]; int x, y; x = getx(); y = gety();
    substr(_entry_name, 0, 14, name);
    if ((strlen(name) == 0) || ( ! carrier())) name = "Alt-Z for Help";
    strcat(name, "              ");
    pstraxy( name, 1, statline, (statback * 16) + statfore); gotoxy(x, y);
}
autocap()
//  Please read Autocap.Slt included in this archive for a commented
//  description of this function.
{
    str datebuf[16]; str timebuf[16];
    date (curtime(), datebuf); time (curtime(), timebuf);
    str capfile[25] = "C:\TELIX\CAP\"; copystr (_entry_name, capfile, 13, 8);
    str capext[4]   = ".CAP"; copystr (capext, capfile, 21, 4);
    capture (capfile);
    prints ("");
    prints (":TELIX 3.20:");
    printsc ("   Logged on to "); printsc (_entry_name); printsc (" @ "); printsc (_entry_num);
    printsc (" on "); printsc (datebuf); printsc (" at "); prints (timebuf);
    printsc ("         Capture in "); prints (capfile);
    prints ("::");
}
