Index | Syntax | Notes  



CTTY--Examples

To change control of all input and output from the current device (your computer monitor and keyboard) to the AUX port, type the following at the command prompt: ctty aux In this example, a remote terminal device connected to the AUX port controls input and output for your system. To transfer input and output back to the monitor and keyboard, type the following command at the remote terminal: ctty con

An invalid device, (tested om Win98).
Caution: two lines below got wrapped.


    @ECHO OFF
    CTTY >%temp%.\~hello.tmp
    ECHO. %
    ECHO         Hello world!
    ECHO.
    :: PAUSE>CON
    ECHO.
    CTTY CON
    ECHO EXIT | %COMSPEC% /k PROMPT s0100L252 d a$_q | DEBUG %temp%.\~hello.
tmp | FIND ":" > %temp%.\~hello.scr
    ECHO EXIT|%COMSPEC%/kPROMPT e100'f100L00'$_e109"' '"d a'w'd a'q'd a$_rcx
$_14$_w$_q|DEBUG %temp%.\~hello.scr>NUL
    REM;  or:                                      '" "'
    REM;  or:                                      ' 20'
    REM;  07, 09 or FF etc...
    ::
    DEBUG %temp%.\~hello.tmp <%temp%.\~hello.scr>NUL
    ECHO. ==========================
    COPY  %temp%.\~hello.tmp CON>NUL
    REM;  or TYPE %temp%.\~hello.tmp
    ECHO. ==========================
    ERASE %temp%.\~hello.*

::  Note: The script removes an error message from the ~hello.tmp file.


Links News section, page 5.
-Top- | Syntax | Notes