\begindata{text,538288956}
\textdsversion{12}
\template{help}
\define{global
}


\chapter{Typescript: A Command Window

}
\section{What Typescript is

}\leftindent{
Typescript is a window in which you type and enter Andrew System and operating 
system commands.


In most cases, the commands that you enter in Typescript get passed along to 
the shell, a program that interprets commands for the operating system.  You 
do not have to know more about the shell in order to use Typescript.  However, 
if you would \italic{like} to know more about the shell, you can look at the 
\italic{\helptopic{csh}} (C-shell) help document.  Typescript can be used as a 
front end to other programs as well, not just the shell.   See the Quick 
Reference section for details.}


\section{Starting Typescript

}\leftindent{
One Typescript window automatically starts when you log in, but you can use 
more than one Typescript if you wish.  When Typescript is ready to accept 
commands, it displays a prompt (normally the percent sign %) which is followed 
by a blank line.  To enter a command, move the mouse cursor into Typescript, 
type the command, and press Enter.  


To start a new Typescript window type 


\leftindent{\typewriter{\bold{typescript}}}


in your existing Typescript window and press Enter.  New Typescripts work the 
same way as existing Typescripts.  


If you are running wm, you can select "New Typescript" from the "Expose" menu 
in the title bar of any window or from the menus that come up in the grey area 
of the screen.

}
\section{Using Typescript

}
\leftindent{To enter a command, move the mouse cursor into Typescript, type 
the command at the prompt, and press Enter.  }\leftindent{ For example, to 
edit a file called "notes",  you type


\leftindent{\bold{\typewriter{ez notes}}}


at the Typescript prompt and press the Enter key.


The Typescript window behaves like an EZ window with one exception: only the 
text that appears after the last prompt can be cut or changed.   The other 
lines are, of course, commands that you have already issued which cannot be 
changed (they can, however, be copied).  You can scroll the Typescript window 
backward to see the results of previous commands, but if your session with 
Typescript gets too long, the earliest commands that you entered are silently 
discarded and you cannot scroll back to them.   

}
\section{Advice

}\leftindent{
\bold{Repeating Typescript commands.} You can use "Esc =" to repeat 
previously-typed commands in the Typescript window.  To do this, press the Esc 
key, release it, and press the = key.  Pressing Esc = multiple times causes 
each previous command to be displayed, in order, at the current Typescript 
prompt.  When you see the command you want to repeat at the prompt, simply 
press Enter.


Here is an illustration of how "Esc =" works.  Suppose you have some commands 
in your Typescript window that look like this: 


% \bold{\typewriter{edit notes}}

% \bold{\typewriter{messages}}

% \bold{\typewriter{sendmail}}

%


When you exit the mail-sending program, you realize that you had one more 
piece of mail to send.  To call the mail-sending program again without having 
to re-type the command, press "Esc =".  The most recently-issued command 
("sendmail" in this case) is printed at the current Typescript prompt.  You 
can edit or alter the command if you like before you press Enter to enter it. 
  Given the set of commands above, you could get the command "edit notes" at 
the current Typescript prompt by pressing "Esc =" three times.


If you press Esc = too many times and skip over the command you wanted, you 
can go forward again through the commands by pressing "Esc `" (the Esc key 
followed by the backquote key).


\bold{Using}\bold{ IBM PC }\bold{RT arrow keys.}  You can use the arrow keys 
on the RT keyboard to move the text caret in the Typescript window.  The "Page 
Up," "Page Down," "Home", and "End" keys also work, but they scroll the 
Typescript rather than moving the text caret.  "Home" moves the text caret to 
the beginning of the current line; "End" moves the text caret to the end of 
the line or to the the position before the window was scrolled.


\bold{Using  o}\bold{ther keybindings.}  There are other keyboard command 
available for use with Typescript that may enable you to do certain activities 
more quickly.  See the \italic{\helptopic{typescript-keys}} help document for 
a list of them. 

}
\section{Pop-up menu meanings

}
\leftindent{Typescript contains at least two pop up menus, \italic{Front} and 
\italic{Search}.  The\italic{ Front} and \italic{Search} menus are system 
menus that always appear when you press both mouse buttons.  Additional menus, 
such as the \italic{Mail/News} menu, may also appear if you or system 
maintainers have installed them.  See the section below, "Setting up your own 
shell menu" for details about how to install your own menus in Typescript.


\italic{Front menu: }

\leftindent{
\bold{\italic{Paste}}:  Copies the most recently cut or copied text to the 
current cursor position.  (If text is selected in the Typescript window, the 
Copy and Cut menu options appear on the Front menu instead of Paste.)

\leftindent{
\bold{Cut:}  Deletes the selected text into the cutbuffer from which you can 
paste it back into any document.  


\bold{Copy:}  Copies the selected text into the cutbuffer.  You can put the 
text you copied most recently back into any document by choosing Paste.} 


\bold{\italic{Move}}:  If a prevous command or some text is selected in the 
Typescript window, Move moves the text to the current Typescript prompt.  If 
nothing is selected, the line containing the text caret is moved to the 
prompt.. 


\bold{\italic{Execute}}:  If a previous command or text is selected in the 
Typescript window, Execute moves the text to the current Typescript prompt and 
enters it.  If nothing is selected, the line containing the text caret is 
moved and executed.


\bold{\italic{Clear:}}  discards the record of your previous Typescript 
activities.  After clearing the Typescript window, you can no longer scroll 
back and see your previous commands.


\bold{\italic{Quit}}:  exits the Typescript program and closes the window.

}
\italic{Search menu:}

\leftindent{
\bold{\italic{Forward}}:  searches in the Typescript window from the current 
cursor position forward.   After you choose this option, Typescript puts the 
"Find:" prompt in the message region at the bottom of the window.  Type the 
string that you want to search for and press the Enter key.  If any of these 
characters are in the search string


 [ ] * . \\   


precede each of them with a backslash (the last character in the set above). 
 You must do this because these characters have special meaning to the search 
algorithm.  For details about the search algorithm used in Andrew Toolkit 
programs such as Typescript and EZ, see the \italic{\helptopic{searching}} 
help document.


\bold{\italic{Backward}}:  searches in the Typescript window from the current 
cursor position backward.

}
\italic{Mail / News menu: }


For more information on how to use the windows created by these menu 
selections, see the help information on each of the applications (Messages and 
SendMessage). 

\leftindent{
\bold{\italic{Read Mail:}}  starts the Messages program with the -m switch, 
which displays a Messages window and lets you read the mail sent to you by 
other computer users. 


\bold{\italic{Read News:}} starts the Messages program, which displays a 
Messages window and lets you read both your mail and notices from the bulletin 
boards to which you are subscribed.


\bold{\italic{Send Message:}}  creates a SendMessage window, from which you 
can send either mail messages or bulletin board posts. 


\bold{\italic{Send Comment:}}  creates a SendMessage window already addressed 
to \bold{advisor}, CMU's local question-and-answer service for Andrew users.}}


\section{Setting up your own shell menu

} \leftindent{

You can specify a shell menu for Typescript in three different ways (by using 
the typescript.shmenu preference, by using \italic{-s}, using \italic{-m 
filename}, or creating a file called ".shmenu" in your home directory).  Each 
way requires that you establish a file somewhere containing the specification 
for the new menu(s).  See the Quick Reference section for details on 
specifying your own shell menu file.


If you plan to make permanent additions to your Typescript menus that will add 
to the menus provided by the system, you should create a file called ".shmenu" 
in your home directory.  (When you create this file, typescript will read it 
instead of the system shmenu file.)  Then, copy the commands in the system 
file /usr/andrew/lib/shmenu into your .shmenu file.  These commands are the 
commands that system administrators have created to add the "Mail/News" menu 
card in your Typescript window.  Copying them into your shmenu file keeps the 
"Mail/News" card available.


\bold{Adding an example menu card and menu option.}  Each menu option in a 
shmenu file is defined in the following format:


  \italic{ MenuName}~\italic{Priority},\italic{MenuOption}~\italic{Priority}:\
\italic{command

}
To make a new "Start Editor" option appear on a new menu card called "Editor," 
you would only have to add a line like this one to your own .shmenu file and 
start a new Typescript:


   Editor~40,Start Editor~11:ez


The first item on each line is the name of the menu (Editor), followed by its 
priority number (~40).  The first priority number tells Typescript where to 
position the menu card in relation to other menus;  the 40 means that the 
Editor menu card will be the fourth menu card in Typescript.  The Front menu 
is numbered 10, the Search menu is numbered 20, and the Mail/News menu card is 
numbered 30. 


After the comma comes the menu option as it should appear on the menu (Start 
Editor), followed by a priority number for the entry (~11).  This priority 
number determines where each menu option appears on the menu card; the group 
of options beginning with 10 go at the top.  (Other options with priority 
numbers beginning with 1's like 13, 15 or 19 would be listed in the same group 
as Start Editor in numerical order.)  Differences in the tens column (10's to 
20's to 30's, up to 99 max.) indicate where blank lines should appear between 
groups of menu options that might follow.  After the colon is the command 
string that is sent to Typescript when the menu option is chosen.  When the 
menu option Start Editor is chosen, the command string "ez" appears in the 
Typescript with a new line inserted after it to enter the command.  It is not 
possible to prevent the new line from being added at the end; it is added by 
the Typescript program itself.

}
\section{Warnings

}\leftindent{
Some programs require you to type Ctrl-D in Typescript to terminate their 
input.  Be careful not to type an extra Ctrl-D because it can terminate the 
c-shell process in Typescript, forcing you to start a new Typescript window. 
  


Ctrl-Z will suspend a program running in Typescript, but will not affect 
Typescript.


Ctrl-C terminates a running program and Ctrl-\\ terminates it with a dump, but 
neither affects the shell.

}\leftindent{
}\section{Quick reference

}\leftindent{
\bold{Syntax}


typescript [ -F ] [ -t \italic{title} ] [-t "\italic{message}"] [ -s ] [ -m 
 \italic{filename} ] [-f \italic{font}]  [ \italic{command} [ 
\italic{arguments} ... ] ]


\bold{Options/arguments}


\bold{-F}  adds a File Menu card similar to the one in EZ, containing the 
options Save As, Set Printer, Print, Preview.  These options allow you to save 
a Typescript into a document and use various printing options. [default]


\bold{-t}   inserts the words that you supply into the middle of the 
Typescript title bar.  Put titles of more than one word inside quotation 
marks, like this:


  typescript  -t  "Your ad here"


\bold{-s}  installs the shell menu.  This is the default unless you use the 
\italic{command} option to start a Typescript containing another program.  To 
find a shell menu, Typescript first looks for a path to a shell menu in your 
preferences file.  (Use the typescript.shmenu preference to set this path). 
 It then looks for a .shmenu file in your home directory.   (If neither of 
these is found, Typescript will try to find a system shmenu file, if one is 
defined at your site.)


\bold{-m  \italic{filename} } uses the named file for the shell menu.  This 
option lets you start typescript with an experimental shmenu file from a 
different directory. 

}\leftindent{
\bold{-f\italic{ font}  }allows the user to specify the default font for use 
in the typescript.


\bold{\italic{command} [ \italic{arguments} ... ]}  dedicates a new Typescript 
window to running an application with any arguments you provide.  When you 
quit from an application program that you started in this manner, the 
Typescript window associated with it disappears.}\leftindent{


\bold{P\bold{references}}


\bold{\italic{typescript.shmenu: }}

\leftindent{You can reset this preference with the path to your own shell menu 
file.  (Remember, you can also read a shmenu file by putting a .shmenu file in 
your home directory.  You can then use this preference to override that file 
when needed.)

}}
\section{Related tools}  


Select (highlight) one of the italicized names and choose "Show Help on 
Selected Word" from the pop-up menu to see the help file for:

\leftindent{
\italic{\helptopic{csh}}   (more about the UNIX c-shell)

\italic{\helptopic{typescript-keys}}   (keybindings for Typescript)

}

\begindata{bp,537558784}
\enddata{bp,537558784}
\view{bpv,537558784,164,0,0}
Copyright 1992 Carnegie Mellon University and IBM.  All rights reserved.

\smaller{\smaller{$Disclaimer: 

Permission to use, copy, modify, and distribute this software and its 

documentation for any purpose is hereby granted without fee, 

provided that the above copyright notice appear in all copies and that 

both that copyright notice, this permission notice, and the following 

disclaimer appear in supporting documentation, and that the names of 

IBM, Carnegie Mellon University, and other copyright holders, not be 

used in advertising or publicity pertaining to distribution of the software 

without specific, written prior permission.



IBM, CARNEGIE MELLON UNIVERSITY, AND THE OTHER COPYRIGHT HOLDERS 

DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 

ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT 

SHALL IBM, CARNEGIE MELLON UNIVERSITY, OR ANY OTHER COPYRIGHT HOLDER 

BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 

DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 

WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 

ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 

OF THIS SOFTWARE.

 $

}}\enddata{text,538288956}
