Use Command [U]
Executes part or all of the commands in a file.
USE filename [ rangelist ]
(Q=no display, J=no open error)
(Default: * means current or last workfile, range=all)
Qedit opens filename and reads command lines from it, instead of from Stdin. “*” as the filename either closes the current workfile and Uses it, or Uses the workfile most recently closed, including a scratch file. Execution continues until the last line of the usefile or until you strike Control-Y.
Qedit prints the commands on Stdlist, unless you do UQ. To print instructions to the user even when UQ is in effect, put Q commands in your usefile. :Comment commands will document the usefile; the comment is not printed with UQ.
Examples
/use fixspell {execute a list of Changes} ch "reveiw"review" @ {commands are printed} ch "corelate"correlate" @ /use $ 30/ {rangelist, last file} /use * {* = last Open workfile} /use fixit 2/5 {do lines 2/5 only} /use compile "extfile" {do lines with string}
{See the Q command for a sample usefile that compiles}
Notes
The Use command temporarily redirects Qedit’s command input device, reading commands from a file. The same features and restrictions apply to the commands in a usefile as would apply to commands typed on the terminal. For example, a command cannot be continued from one line to the next, usefiles do not accept parameters, etc. For these types of features, see User Commands (UDCs and command files).
The usefile can be of any file type allowed in Text or Add. Although Qedit allows nested usefiles, you cannot have nested loops. Usefiles support :If and :Else for conditional logic, but not :While. For looping and parameter power, use command files.
If the usefile does not exist, UJ suppresses the error message that would be printed, allowing optional Use commands in Qeditmgr files.