Shell Commands/NewShell

From MorphOS Library

Revision as of 12:33, 3 March 2015 by JPV (talk | contribs) (Created page with "'''NewShell''' - Starts a new interactive CLI/SHELL on the system WINDOW, FROM <nowiki> WINDOW - window specifications (see below) FROM...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

< Shell Commands

NewShell - Starts a new interactive CLI/SHELL on the system

WINDOW, FROM

WINDOW - window specifications (see below)                                     
FROM   - script to execute at shell startup (default is S:Shell-Startup)

Using the WINDOW parameter, you specify the initial dimensions, location, and title of the window with this syntax:

x      number of pixels from the left edge of the screen to
       the left border of the Shell window.
       Use a value (//) to specify the minimum possible pixels.
y      number of pixels from the top of the screen to
       the top of the Shell window.
       Use no value (//) to specify the minimum possible pixels.
width  width of the Shell window, in pixels.
       Use no value (//) to specify the full width of the screen.
height height of the Shell window, in pixels.
       Use no value (//) to specify minimum possible height.
title  text that appears in the Shell window title bar.

Options can be one or more of:

AUTO       The window automatically appears when the program
           needs input or produces output. With the Shell window, it opens
           for input immediately. The window can only be closed
           with the EndShell command. Selecting the Shell's close gadget
           closes the window, but it re-opens immediately
           since it is expecting input.
ALT        The window appears in the specified size and position when
           the zoom gadget is clicked. The four parameters must be
           separated with slashes (for example, ALT30/30/200/200).
BACKDROP   The window appears on the backdrop, behind all the
           Ambient windows. This Shell window cannot be brought
           to the front of the screen; you have to resize the
           Ambient windows to see it.
CLOSE      The window has all the standard gadgets, including
           a close gadget. This is the default for Shell windows,
           but you must specify it to get a standard Shell if
           you use the WINDOW argument.
INACTIVE   The window opens, but is not made the active window.
NOBORDER   The window opens without any left or bottom window border.
           Only the zoom, depth, and sizing gadgets are available.
NOCLOSE    The window does not have a close gadget. If you open
           a console normally, there is no close gadget. If you open
           a console using the AUTO option, there is automatically
           a close gadget on the window.
NODEPTH    The window has no window depth gadget.
NODRAG     The window cannot be dragged.
           It has zoom, depth and sizing gadgets, but no close gadget.
NOSIZE     The window only has a depth gadget.
SCREEN     The window opens on a public screen. The screen must already exist.
           You must specify the name of the screen after the SCREEN keyword.
SIMPLE     If you enlarge the window, the text expands to fill the newly
           available space, allowing you to see text that had been
           scrolled out of the window. This is the default
           for standard Shells.
SMART      If you enlarge the window, the text does not expand
           to fill the newly available space. This saves memory.
WAIT       The window can only be closed by selecting the close gadget
           or entering Ctrl+. If WAIT is the only option,
           there is no close gadget.


Example:

SYS:> NewShell "CON://640/480/My Shell/CLOSE"

Opens a shell window in top-left corner, of size 640x480, a close gadget and of name 'My Shell'.