home *** CD-ROM | disk | FTP | other *** search
/ Vectronix 2 / VECTRONIX2.iso / FILES_07 / PANDORA.ZIP / MPD0724 / PCOMMAND.DOC < prev    next >
Text File  |  1985-11-20  |  20KB  |  378 lines

  1.       Command Overview
  2.       Copyright (c) 1986
  3.       Solid Applications Inc.
  4.       1333 Moon Drive
  5.       Yardley, PA 19067
  6.       
  7.       
  8.       Command is a shareware product from Solid Applications Inc.
  9.       You are allowed to give a copy of the PCOMMAND.PRG program
  10.       and this documentation to anyone for no charge.  The program
  11.       may not be sold or included as part of a package for sale without
  12.       prior written approval from Solid Applications.  We encourage
  13.       you to distribute this package to your friends and coworkers who
  14.       are using the Atari ST.
  15.       
  16.       You may register your copy of PCommand with Solid Applications
  17.       for $25.00.  You will receive a copy of the full documentation
  18.       and a disk containing the desk accessory version of PCommand
  19.       along with some useful utilities including a format program which
  20.       creates diskettes that can be read on an IBM PC (both single and
  21.       double sided disks).
  22.       
  23.       
  24.       
  25.       WHAT IS PCOMMAND:
  26.       
  27.       Command  is  a  line-oriented  command  line interpreter with
  28.       batch file support.   It provides an interactive interface to Atari
  29.       TOS which runs on the Atari ST.   Commands are similar to PC-DOS
  30.       commands  PCommand provides faster access to TOS facilities than
  31.       the GEM desktop.  Multiple commands can be entered on a single line
  32.       for even better efficiency.
  33.       
  34.       Command has a number of built-in commands which are always available
  35.       and can run GEM or TOS-based applications by simply typing their name.
  36.       A list of local commands is displayed by typing HELP.  The batch file
  37.       facility can be used to present GEM-based menus and alert boxes.  This
  38.       allows a GEM interface to be built using a text editor to create a
  39.       batch file.  Most text editors available for the ST will work.
  40.       
  41.       
  42.       
  43.       SPECIAL KEYS AND EDITING
  44.       
  45.       Commands entered at the command prompt can be edited using the
  46.       following special keys.
  47.       
  48.            control-S            Suspend  output
  49.            control-Q            Continue output
  50.            control-C            Enter query mode if BREAK is ON
  51.            ESC                  same as control-C
  52.       
  53.            RETURN               Use current line as command
  54.            control-A            Move to start of line
  55.            control-B            Move forward  one character
  56.            control-C            Copy template until matching
  57.                                 character      
  58.            control-E            Move to end of line
  59.            control-F            Move backward one character
  60.            control-J            Skip to next template character
  61.            control-N            Copy next template character
  62.            control-R            Restart entry on the next line
  63.            control-T            Make current input into template
  64.            control-X            Delete current line
  65.            control-Z            Copy rest of template
  66.            ESC                  Same as control-X
  67.            Left  arrow          Same as control-B
  68.            Right arrow          Same as control-F
  69.            Home                 Same as control-R
  70.            Undo                 Same as control-Z
  71.            Shifted left  arrow  Same as control-A
  72.            Shifted right arrow  Same as control-E
  73.            Shifted Home/Clr     Same as control-X
  74.            F1                   Same as control-N
  75.            F2                   Same as control-C
  76.            F3                   Same as control-Z
  77.            F4                   Same as control-J
  78.            F5                   Same as control-T
  79.       
  80.       
  81.       BUILT-IN COMMANDS
  82.       
  83.       Command has a number of built-in commands which can be entered
  84.       directly or used in batch files.   There is also a small set of
  85.       commands which can only be used within a batch file.  The following
  86.       is a list of built-in commands.
  87.       
  88.            ?         Show built-in command list
  89.            ABORT     Show/Set Abort option
  90.            BELL      Sound bell
  91.            BREAK     Show/Set Break option
  92.            BYE       Exit from batch file/PCommand
  93.            CD        Change current directory
  94.          * CHAIN     Chain to new batch file
  95.            CHDIR     Change current directory
  96.            CLS       Clear screen
  97.            COPY      Copy file(s)
  98.            CP        Copy file(s)
  99.            CTTY      Show/set console device
  100.            DATE      Show/set date
  101.            DEL       Delete file(s)
  102.            DIR       Show directory
  103.            D         Show directory
  104.            ECHO      Set/show/display text
  105.            ERASE     Delete file(s)
  106.            ERA       Delete file(s)
  107.            EXIT      Exit from batch file/PCommand
  108.          * FOR       Iterate over file name(s)
  109.            GEM       Show/set/menu interface
  110.          * GOTO      Goto label in batch file
  111.            HELP      Show built-in command list)
  112.          * IF        Conditional command execution
  113.            INPUT     Interactive/text input
  114.            LOG       Show/set command logging status
  115.            MKDIR     Make new directory
  116.            MD        Make new directory
  117.            PATH      Show/set default search path
  118.            PAUSE     Wait for input
  119.            PRINT     Print file(s)
  120.            PROMPT    Show/set prompt
  121.            QED       Quick editor for creating batch files
  122.            REM       Remark (comment)
  123.            REN       Rename a file
  124.            RENAME    Rename a file
  125.            RESERVE   Reserve memory for program
  126.            RMDIR     Remove directory
  127.            RD        Remove directory
  128.            SET       Show/Set environment string
  129.          * SHIFT     Shift arguments
  130.            STACK     Show current execution stack
  131.            SWITCHAR  Show/set switch character
  132.            TIME      Show/set time
  133.            TOS       Execute program in TOS environment
  134.            TYPE      Type file on console
  135.            VER       Display TOS version number
  136.            VERIFY    Show/Set floppy disk verify mode
  137.            VOL       Show disk volume label
  138.            WRAP      Show/Set end of line wrap mode
  139.       
  140.       
  141.          * indicates batch file use only.
  142.       
  143.       
  144.       Multiple commands are placed on a line by separating them with
  145.       an exclamation point, '!'.  Command lines can be up to 160
  146.       characters.  Labels are the GOTO command are names immediately
  147.       preceeded by a colon, ':'.  Any text after a label is assumed to
  148.       be a comment.
  149.       
  150.       Batch file parameters are indicated by a leading percent sign, '%'.
  151.       A single digit after '%' indicates a parameter to the batch file.
  152.       The parameter relaces both the percent sign and digit.  Any of the
  153.       following special characters can be used if the percent sign is
  154.       immediately followed by a colon, ':'.
  155.       
  156.           %:c       first character from last INPUT result
  157.           %:d       disk letter from last GEM :FILE command
  158.           %:e       ERRORLEVEL from last program
  159.           %:f       file name   from last GEM :FILE command
  160.           %:i       string from last INPUT result
  161.           %:p       path name   from last GEM :FILE command
  162.           %:v       video mode (0=low, 1=medium, 2=mono)
  163.           %::       current time
  164.           %:/       current date
  165.       
  166.       
  167.       BUILT-IN COMMANDS
  168.       
  169.       General syntax: optional items are placed within square
  170.       brackets such as [XYZ].  Alternatives are separated by a
  171.       vertical bar as with ON|OFF.  Repeated items are followed by
  172.       ellipses (...).  Note, keywords do not have to be capitalized
  173.       when used.
  174.       
  175.            ?                   Help command, no parameters,
  176.                                print built-in commands
  177.            ABORT [ON|OFF]      Set/show ABORT flag, OFF indicates
  178.                                termination when BREAK is ON and a
  179.                                control-C or ESC key is pressed.
  180.                                ON prints the STACK status and allows
  181.                                the system to be restarted at the
  182.                                specified point.
  183.            BELL                Sounds the bell.
  184.            BREAK [ON|OFF]      PCommand recognizes control-C and ESC
  185.                                only if the BREAK flag is ON.
  186.            BYE [number|ON|OFF] Same as EXIT command.  Set the EXIT
  187.                                flag or exit from the current batch file
  188.                                or input mode for 1 or more (number) levels.
  189.            CD [drive:|path]... Same as CHDIR, set/show current default
  190.                                directory of the current or specified drive.
  191.            CHAIN file [parameter ...]        (Batch file only)
  192.                                Exit current batch file and continue execution
  193.                                of the new batch 'file' using new 'parameters'.
  194.            CHDIR               Same as CD command
  195.            CLS [option]        Clear part of screen which 'option' is:
  196.                                 LINE    all of the current line
  197.                                 EOL     from cursor to end of line
  198.                                 EOS     from cursor to end of screen
  199.                                 BOL     from cursor to beginning of line
  200.                                 BOS     from cursor to beginning
  201.                                           of screen
  202.                                 INSERT  insert new line, delete the one
  203.                                           at the bottom of the screen
  204.                                 DELETE  delete current line, add one
  205.                                     at the bottom of the screen
  206.             COPY source [...] [destination] [/D]
  207.                                 copy files from to the 'destination' file,
  208.                                 disk, or folder.  Copy only data files if
  209.                                 /D is included.
  210.             CP                 Same as COPY command.
  211.             CTTY [CON|AUX|PRN|MIDI]
  212.                                Change console to specified device.
  213.             DATE [date|SHOW]   Set/show date
  214.             DEL file [...]     Delete one or more files
  215.             D   [directory ...] [/P] [/W] [/F]
  216.             DIR [directory ...] [/P] [/W] [/F]
  217.                                Display one or more directories.
  218.                                /P for printer output
  219.                                /W for wide output (4 entries/line)
  220.                                /F show free space on disk
  221.             ECHO [ON|OFF|[@[option] ...] [#][text]
  222.                                Set/show echo mode or print 'text'.
  223.                                '#' allows leading blanks.
  224.                                Option format is:
  225.       
  226.                 row column          Position cursor
  227.                 Foreground color    Set text foreground color
  228.                 Background color    Set text background color
  229.                 Cursor [ON|OFF]     Turn cursor on or off
  230.       
  231.                 i.e. ECHO @10 10 @F 1 @BACK 0 @Cursor ON # Example
  232.             ERA                Same as DEL
  233.             ERASE              Same as DEL
  234.             EXIT               Same as BYE
  235.             FOR %%v IN ( file [...] ) DO command
  236.                                Batch file command only.
  237.                                Perform command while substituting
  238.                                variable %%v, where 'v' is any character,
  239.                                while a 'file' is in the list.  Names with
  240.                                wild card characters cause a directory to
  241.                                be searched.
  242.             GEM [ON|OFF|command|:option]
  243.                                Set/show GEM mode for .PRG files.
  244.                                ON to run .PRG files as from desktop
  245.                                Optionally force any program 'command'
  246.                                to run from the desktop mode.
  247.                                'option' has the following form:
  248.             NOTE: SQUARE BRACKETS AND '|' ARE REQUIRED HERE.
  249.                       They do not imply an optional arguments.
  250.       
  251.             GEM :ALERT default [type][text][buttons]
  252.                            'default' specifies the default button
  253.                            where no default is 0.  The 'type' specifies
  254.                            the icon type (0 to 3, see GEM documenation).
  255.                            'text' and 'button' items are separated
  256.                            by a '|'.  Three 'button's max.  The
  257.                            %:e, ERRORLEVEL, variable is set to the
  258.                            selected button (1 to 3)
  259.             GEM :FILE [path] [file]
  260.                            presents the GEM file selector menu.
  261.                            'file' may be blank.  Results are in
  262.                            %:f for the file name and %:p for the
  263.                            path name, and %:d for drive letter.
  264.                            %:e is 0 if OK is selected and 1 if
  265.                            Cancel is selected.
  266.             GEM :SELECT default [text][button]
  267.                            General button selection which can have
  268.                            more text and buttons than :ALERT but
  269.                            no icon option.  'text' can be as wide as
  270.                            the screen (less 2 characters).
  271.             GEM :INPUT [text][valid]
  272.             GEM :INPUT [text][valid|format]
  273.             GEM :INPUT [text][valid|format|default]
  274.             GEM :INPUT [text][valid|format|default|output]
  275.                            General single line text input menu.
  276.                            'text' is like :ALERT and :SELECT and
  277.                            appears at the top of the menu.  The
  278.                            text entered is place into %:i.  The
  279.                            'valid', 'format', 'default' and 'output'
  280.                            options control what can be entered.  The
  281.                            'valid' string can contain any of these:
  282.       
  283.                      9         digits 0 to 9
  284.                      A         uppercase letters and space
  285.                      a         any letter and a space
  286.                      N         uppercase letters, digits and a space
  287.                      n         any letter, digits and a space
  288.                      F         file name characters plus : ? *
  289.                      f         file name characters plus :
  290.                      P         path name characters plus : \ ? *
  291.                      p         path name characters plus : \
  292.                      X         any character
  293.       
  294.                                'format' and 'output' specify where the
  295.                                actual text goes using '_' and all other
  296.                                characters are decoration.
  297.                                
  298.               Examples:
  299.       
  300.                GEM :INPUT [An example:][XXXXXXXXXXXXXX]
  301.                GEM :INPUT [Enter a date:][999999|__/__/__]
  302.                GEM :INPUT [Enter a date:][999999|__/__/__|112288]
  303.                GEM :INPUT [Enter a date:][999999|__/__/__||__-__-__]
  304.       
  305.             GOTO label         Continue batch file execution after
  306.                                the line that starts with :label
  307.             GOTO #number label [...]
  308.                                Computed GOTO based upon the value of
  309.                                'number' where the first label is 0.
  310.                                Continue if there is no corresponding label.
  311.             HELP               Print list of built-in commands.
  312.             IF [NOT] EXISTS file          command
  313.             IF [NOT] FOLDER folder        command
  314.             IF [NOT] ERRORLEVEL level     command
  315.             IF [NOT] s1==s2               command
  316.                                Execute 'command' if condition met.
  317.             INPUT [#][prompt]  Enter the interactive mode if no parameters,
  318.                                otherwise, print the 'prompt' and accept one
  319.                                line from the keyboard.  A leading '#' will
  320.                                not be printed and allows for leading spaces.
  321.             LOG [ON|OFF]       Set/show LOG flag status.  PCommand prints
  322.                                the program/batch file name when ON.
  323.             MKDIR name [...]   Create a new folder.
  324.             MD    name [...]   Same as MKDIR.
  325.             PATH [;|path]      Set/show PATH list.  Reset with ';'.
  326.                                The PATH is used to find program/batch files.
  327.                                'PATH path' is in the environment list.
  328.             PAUSE              Display 'Press any key to continue' and wait.
  329.             PRINT file [...] [/P] [/B]
  330.                                List 'file's on the printer.
  331.                                /P to paginate with form feed at 55 lines/page.
  332.                                /B print until the physical end-of-file.
  333.                                   Default is includes control-Z too.
  334.             PROMPT [prompt]    Set/show PROMPT string which can include:
  335.                   $_             New line (CR/LF)
  336.                   $B             Vertical bar
  337.                   $Cx            Control character (control-x)
  338.                   $D             Current date
  339.                   $G             '>' character
  340.                   $H             Backspace character
  341.                   $L             '<' character
  342.                   $N             Current default drive
  343.                   $P             Current default path on default drive
  344.                   $T             Current time
  345.                   $V             TOS version number XX.YY
  346.                   $X             '!' character
  347.             QED file              Create a new 'file' using simple line editor.
  348.                                   End of file indicated by a RETURN only.
  349.             REM comment           Remark in batch file.
  350.             REN    old_name  new_name    Rename file.  Works across directories.
  351.             RENAME old_name  new_name    Same as REN command.
  352.             RESERVE [size]        Set/show reserve size.  Normally for desk
  353.                                   accessory version which can reserve a block of
  354.                                   memory to run a second program in.  'size' is
  355.                                   in kilobytes and the default is 0.
  356.             RMDIR folder [...]    Delete empty folder.
  357.             RD    folder [...]    Same as RMDIR command.
  358.             SET [keyword[=value] ...]
  359.                                   Show/set/reset environment list parameter.
  360.                               Environment list can be accessed by applications.
  361.                               'keyword' and 'value' can be any non-blank string.
  362.             SHIFT [number]        Batch file only.  Shift parameter list by
  363.                                  'number' (default is 1).
  364.             STACK                 Display execution stack.  Useful from within
  365.                             INPUT or batch files.
  366.             SWITCHAR [character]  Show/set parameter character.  Default is '/'.
  367.             TIME [time|SHOW]      Set/show current time.
  368.             TOS command [parameters ...]
  369.                               Force 'command' to execute in TOS mode (no mouse).
  370.             TYPE 'file' ... [/B] [/P]  Type 'file's on screen 
  371.                                   /B and /P are same as in PRINT command.
  372.             VER                   Display TOS version number
  373.             VERIFY [ON|OFF]       Set/show floppy disk verify flag
  374.             VOL [drive:]...       Show volume name of 'drive'.
  375.             WRAP [ON|OFF]         Set/show WRAP flag. Default is ON. Cursor will
  376.                                   goto next line if ON and at end-of-line.
  377.  
  378.