home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
CMDINF.ZIP
/
CMDLINE.INF
(
.txt
)
Wrap
OS/2 Help File
|
1992-09-04
|
27KB
|
695 lines
ΓòÉΓòÉΓòÉ 1. About the CommandLine Application Launcher ΓòÉΓòÉΓòÉ
About the CommandLine Application Launcher
CommandLine acts as an on-demand command prompt, allowing users to execute an
OS/2 command or program without leaving the active PM application in search of
an icon or an open OS/2 session, thus eliminating the need for "spare" OS/2
sessions and avoiding the irritating keyboard-mouse-keyboard cycle.
The package can be invoked via a user-defined hot key, remembers previous
commands across boot sessions and takes full advantage of OS/2 2.0 ability to
transparently launch DOS and Windows applications. It has aliasing, inline
file find and filename completion and an inline REXX expression interpreter
extendable through REXX and DLLs.
In addition to providing a hotkey prompt, CommandLine acts as a fast task
switcher. Any program or command can be assigned to a hotkey, with a variety
of options. The hotkey can be set to switch to the same session or always
start a new one. Programs started by a hotkey can be set to restart
automatically in the event of termination, abnormal or otherwise. CommandLine
also allows the user to toggle between the two most recently used windows.
Finally, CommandLine simplifies access to several Workplace Shell features.
Users can open a directory folder by specifying its name, without traversing
through the Drives folder. Program icons can be created in the same manner.
Other WPS objects can be created using the SysCreateObject call directly from
the CommandLine prompt. In addition, the program can act as a Workplace Shell
replacement in vertical or low memory environments.
For more information about using the Help facility, select Help For Help in the
Help menu..*
ΓòÉΓòÉΓòÉ 2. Getting Started ΓòÉΓòÉΓòÉ
Getting Started
To install CommandLine, place the diskette in your 3.5" floppy drive. In any
command window, type "A:SETUP" and press Enter. The SetUp program will start,
and request several path-related items: where to place the CommandLine files,
the DLL, the INF information file and object placement. Any time that one of
the entries is set to a path not found in the corresponding environment
variable within the CONFIG.SYS file, one of the environment variable change
boxes will be checked. These indicate the changes which will be made to
CONFIG.SYS. If you specify "Add to Startup folder", CommandLine will run
automatically as part of the Startup folder processing. Otherwise, you may
choose the Command Prompts folder or you may manually add CommandLine to your
STARTUP.CMD file. You probably want to use the defaults. If you don't, you may
have to reboot prior to using CommandLine to ensure access to the DLL.
If you want to use CommandLine as a Workplace Shell replacement, please refer
to the Tips and Techniques section.
After installation, CommandLine will run automatically as part of the Startup
folder processing, unless you specified otherwise. You should notice the
CommandLine Logo window during system startup. Hold down the Alt key and press
the Space bar to bring up the CommandLine window.
Take a solemn moment here -- you may well have used the command window for the
very last time.
ΓòÉΓòÉΓòÉ 3. Launching Commands ΓòÉΓòÉΓòÉ
Launching Commands
CommandLine accepts commands just like any OS/2 command window. It checks the
application type and will start Presentation Manager, Windows and window
compatible applications directly through PM. Applications requiring shell
support will be started in the OS/2 or user-specified command shell. Multiple
commands can be entered on the same line by joining them with ampersands.
Commands can also be launched by typing an associated alias or pressing a
hotkey.
For more information regarding the OS/2 Command Interpreter, see the OS/2
Command Reference, or enter "VIEW CMDREF" in any OS/2 command Window.
Also see Aliases Hotkeys File Name Completion File Find
ΓòÉΓòÉΓòÉ 4. File Name Completion ΓòÉΓòÉΓòÉ
File Name Completion
File paths and names will be completed when you press Ctrl and the Right Arrow
key. If an exact match is found, the file will be completed automatically. If
no match is found, a low beep will sound. If there are several files matching,
a listbox will appear containing the files for selection. Directories are
indicated by having a backslash appended to them. Double clicking the mouse or
pressing Enter will add the highlighted file to the command.
Also see File Find
ΓòÉΓòÉΓòÉ 5. File Find ΓòÉΓòÉΓòÉ
File Find
File Find is very similar to File Name Completion, except that it will
recursively check directories for matching files from the directory specified
when you press Ctrl and the Left Arrow key. If no directory is specified, the
search will begin from the root. While the search is in progress, the
directory being scanned is displayed in the titlebar of the match window. The
search can be terminated by pressing Esc.
Also see File Name Completion
ΓòÉΓòÉΓòÉ 6. Aliases ΓòÉΓòÉΓòÉ
Aliases
Aliases can be associated with command strings using the Aliases dialog box.
Aliases can refer to commands which include CommandLine !directives, but cannot
reference other aliases. An alias can be up to eight characters in length, and
may consist of any characters you can type into the command field, including
punctuation marks and spaces.
Also see Hotkeys
ΓòÉΓòÉΓòÉ 7. Hotkeys ΓòÉΓòÉΓòÉ
Hotkeys
Hotkeys can be associated with command strings via the Hotkeys dialog box.
Hotkeys must point to strings which are valid for your command shell (in most
cases CMD.EXE). CommandLine directives and aliases will be ignored. Commands
associated with hotkeys can be set to autostart on CommandLine startup, and to
be restarted in case of their termination, abnormal or otherwise.
There are two types of hotkeys. The default is Execute Command, defined as a
start key, which will always execute the defined command. The other is Display
Window, defined as a switch key, which will start the defined command only if
it's not already running; otherwise, it will switch to the currently running
session.
CommandLine uses two hotkeys for internal purposes. The first is used to bring
up CommandLine itself. The second is used to toggle between the two most
recently used windows. Both keys are specified in the Hotkeys dialog.
Additionally, for applications to be started by Commandline, there are four
options:
1) Auto Start - Causes the command to be executed automatically during
CommandLine initialization.
2) Restart - Causes the command to be re-executed whenever an instance started
previously terminates. This is particularly useful for server or communication
applications that must stay up.
3) only on abnormal exit - If the restart option above is selected, users may
opt to restart the application ONLY on abnormal exits (e.g. crashes). If the
existing application is properly exited, it will not be restarted.
4) Create New Instance - Causes CommandLine to execute a new instance of the
command every time the hotkey is invoked, rather than switching to an existing
instance.
Also see Aliases
ΓòÉΓòÉΓòÉ 8. CommandLine Command Line Commands ΓòÉΓòÉΓòÉ
CommandLine Command Line Commands
The following flags can be used on the CommandLine Command Line.
CmdLine [-dDir -fFile -sShell]
Flag Meaning
-d Sets current directory
-f Adds a list of commands to the History
-s Specifies an Alternate Shell
ΓòÉΓòÉΓòÉ 8.1. Setting the Current Directory ΓòÉΓòÉΓòÉ
Setting the Current Directory
The -d flag specifies the current directory from which all processing will
start. The argument should consist of a fully qualified path to a valid
directory. The default directory is C:\.
Example: CmdLine -dD:\MYAPPS
CommandLine also allows you to specify the current directory by using the !CD
command (See Changing the Current Directory) or by using the menu option (See
Change Directory).
ΓòÉΓòÉΓòÉ 8.2. Adding Commands to the History ΓòÉΓòÉΓòÉ
Adding Commands to the History
The -f flag specifies the name of a file containing commands to be appended to
the command history. This allows commands to be imported each time CommandLine
is started, ensuring that frequently used or very long commands remain in the
history. There is no default for this option.
Example: CmdLine -fD:\CMD\STD_CMDS.CMD
ΓòÉΓòÉΓòÉ 8.3. Specifying an Alternate Shell ΓòÉΓòÉΓòÉ
Specifying an Alternate Shell
The -s flag specifies the name of an alternate execution shell to be used in
place of the standard OS/2 CMD shell. Shell arguments can be supplied by
wrapping the entire statement in double quotes. The fully qualified name must
be used.
Example: CmdLine -sMKS
Example: CmdLine -s"HCS -q"
ΓòÉΓòÉΓòÉ 9. CommandLine Internal Commands ΓòÉΓòÉΓòÉ
CommandLine Internal Commands
There are several special commands which affect the CommandLine environment.
These are preceded by an exclamation point (!, or 'bang' to you UNIX gurus).
Command Meaning
!CD <directory> Changes current directory
!INTERPRET <expr> Interprets REXX expressions
!OBJECT <filename> Creates Object
Only the first character is used to determine the command, so they can be
reduced to !c, !i and !o. All these commands have menu equivalents.
ΓòÉΓòÉΓòÉ 9.1. Changing the Current Directory ΓòÉΓòÉΓòÉ
Changing the Current Directory
The !CD command changes the current directory from which all processing will
start. It will display the new directory above the command entry field after
processing the command. The argument should consist of a fully qualified path
to a valid directory. The default directory is C:\.
Example: !CD D:\MYAPPS
CommandLine also allows you to specify the current directory during startup
(See Setting the Current Directory) or by using the menu option (See Change
Directory).
ΓòÉΓòÉΓòÉ 9.2. Interpreting REXX Expressions ΓòÉΓòÉΓòÉ
Interpreting REXX Expressions
We consider this facility one of the most useful in CommandLine, and hope you
will as well. The !INTERPRET command sends the input to a REXX expression
interpreter and displays the response, if any. This is particularly useful as
a calculator.
Example: !I 355/113
Example: !I DATE() TIME()
It also has proven to be very useful to programmers during coding sessions, by
using some of the REXX conversion operatives, such as:
Example: !I X2D(3BF)
Example: !I D2B(232)
or as a quick means of trying a code fragment
Example: !I j=1;DO 10;j=j*2;END;
For complex statements like the one above, we return the variable before the
first equal sign. If the statement contains no equal sign as in the first four
examples, we assign one and return the resulting value. Don't try to use the
SAY operator, it will not work in this context. If no response is returned,
then either your statement is bad or our macro failed. Which do you consider
more likely?
ΓòÉΓòÉΓòÉ 9.3. Creating WPS directory folders and program icons ΓòÉΓòÉΓòÉ
Creating objects
Use this facility to create a directory folder without going through the Drives
folder, or to create a program icon without going to templates. All that's
required is the name of the program or directory.
Example: !o x:\OS2\APPS
Example: !o x:\mydir.\mypgm.exe
ΓòÉΓòÉΓòÉ 10. File Menu ΓòÉΓòÉΓòÉ
CommandLine File Menu
The CommandLine menu provides access to CommandLine features for users who do
not wish to use the various shortcut keys and special directives. At the same
time, the menu lists all of the equivalent shortcut keys and directives,
serving as a reminder.
Menu Item Meaning
Locate File... -- Also <Ctrl+Down Arrow> Brings up standard file
dialog
Find file... -- Also <Ctrl+Left Arrow> Finds matching files on
current disk
Complete name... -- Also <Ctrl+Right Arrow> Completes file names
Change Directory -- Also <!CD> Changes current
directory
Hide -- Also <Esc> Hides CommandLine window
Terminate -- Also <F3> Exits CommandLine and
all hotkey applications
Quick Shutdown Shuts down OS/2 without
confirming program exits
All shortcuts are listed in <> brackets to the right of the menu items.
ΓòÉΓòÉΓòÉ 10.1. Locate File... ΓòÉΓòÉΓòÉ
Locate file
The Locate File menu item brings up a standard file dialog, allowing the user
to navigate throughout the file system. Pressing <OK> in the dialog pastes the
selected file or directory into the CommandLine window. Pressing <Cancel>
returns the user to the CommandLine window.
ΓòÉΓòÉΓòÉ 10.2. Find file... ΓòÉΓòÉΓòÉ
Find matching files
Using this menu option will cause CommandLine to use the text in its window as
a file search mask.
For detailed description, see: File Find
ΓòÉΓòÉΓòÉ 10.3. Complete name... ΓòÉΓòÉΓòÉ
Completes path / filename
Using this menu option will cause CommandLine to use the text in its window as
a filename completion mask.
For detailed description, see: File Name Completion
ΓòÉΓòÉΓòÉ 10.4. Change Directory ΓòÉΓòÉΓòÉ
Change Directory
Using this menu option changes the current directory from which all processing
will start. It will display the new directory above the command entry field
after processing the command. The argument should consist of a fully qualified
path to a valid directory. The default directory is C:\.
CommandLine also allows you to specify the current directory during startup
(See Setting the Current Directory) or by using the !CD command (See Changing
the Current Directory).
ΓòÉΓòÉΓòÉ 10.5. Hide ΓòÉΓòÉΓòÉ
Hide CommandLine window
Using this menu option will cause CommandLine to hide itself. CommandLine
would normally hide itself whenever a different window is selected.
ΓòÉΓòÉΓòÉ 10.6. Terminate ΓòÉΓòÉΓòÉ
Exit CommandLine
Using this menu option will cause CommandLine and all processes invoked via the
hotkey or CommandLine autostart features to terminate.
ΓòÉΓòÉΓòÉ 10.7. Quick Shutdown ΓòÉΓòÉΓòÉ
Shuts down OS/2 without confirming program exits
This menu option shuts down OS/2, without confirming the closing of programs,
thereby providing a quicker shutdown. Use this option only if you're sure you
don't require saving data in any of the running programs, as this data will not
be saved.
ΓòÉΓòÉΓòÉ 11. Command Menu ΓòÉΓòÉΓòÉ
CommandLine Command Menu
The CommandLine menu provides access to CommandLine features for users who do
not wish to use the various shortcut keys and special directives. At the same
time, the menu lists all of the equivalent shortcut keys and directives,
serving as a reminder.
Menu Item Meaning
Previous -- Also <Up Arrow> Retrieves previous command
Next -- Also <Down Arrow> Retrieves next command
History... -- Also <Page Up> Brings up command history listbox
Aliases... Brings up Alias definition dialog
Hot Keys Brings up Hot Keys definition dialog
Interpret -- Also <!i> Interprets REXX expressions
Create Object -- Also <!o> Creates Object
All shortcuts are listed in <> brackets to the right of the menu items.
Interpret expects an expression in the entry field when invoked, as Create
Object expects a valid path or filename.
ΓòÉΓòÉΓòÉ 11.1. Previous ΓòÉΓòÉΓòÉ
Retrieves previous command from history
This menu item retrieves the previously typed command into the CommandLine
window, where it can be edited and executed again.
ΓòÉΓòÉΓòÉ 11.2. Next ΓòÉΓòÉΓòÉ
Retrieves next command from history
This menu item retrieves the next command into the CommandLine window, where it
can be edited and executed again.
ΓòÉΓòÉΓòÉ 11.3. History... ΓòÉΓòÉΓòÉ
Shows Command History
Using this menu option causes CommandLine to present a listbox containing the
previously entered commands. If any text was present in the CommandLine
window, the listbox will only display those entries which contain this text.
ΓòÉΓòÉΓòÉ 11.4. Aliases... ΓòÉΓòÉΓòÉ
Alias Definition Dialog
Using this menu option will cause CommandLine to display the alias definition
dialog, where users can enter aliases of up to eight characters for frequently
used commands.
Also see: Aliases
ΓòÉΓòÉΓòÉ 11.5. Hot Keys... ΓòÉΓòÉΓòÉ
Hotkey Definition Dialog
Using this menu option will cause CommandLine to display the hotkey definition
dialog, where users can enter hotkeys and associate them with frequently used
commands or applications.
Also see: Hotkeys
ΓòÉΓòÉΓòÉ 12. Help Menu ΓòÉΓòÉΓòÉ
CommandLine Help Menu
The CommandLine menu provides access to CommandLine features for users who do
not wish to use the various shortcut keys and special directives. At the same
time, the menu lists all of the equivalent shortcut keys and directives,
serving as a reminder.
Menu Item Meaning
Help -- Also <F1> Brings up CommandLine help
Product Information Shows CommandLine product information
ΓòÉΓòÉΓòÉ 12.1. CommandLine Help ΓòÉΓòÉΓòÉ
Brings up CommandLine help
This menu option brings up the CommandLine information file in the OS/2 View
facility. It can also be brought up by hitting the F1 key or typing "VIEW
CMDLINE.INF" at any command prompt.
ΓòÉΓòÉΓòÉ 12.2. CommandLine Product Information ΓòÉΓòÉΓòÉ
CommandLine Product Information
This menu option shows the CommandLine product information, including the Soft
& GUI logo, address and telephone number.
ΓòÉΓòÉΓòÉ 13. Tips and Techniques ΓòÉΓòÉΓòÉ
Tips and Techniques
This section is comprised of a list of suggestions and answers to frequently
asked questions. We hope these suggestions, many of which were originated by
users, will make using CommandLine easier and more productive. If you have
additional suggestions you would like to share, please let us know.
ΓòÉΓòÉΓòÉ 13.1. Utilizing the OS/2 Command Shell ΓòÉΓòÉΓòÉ
Utilizing the OS/2 Command Shell
The OS/2 command shell is full of powerful features. We strongly recommend
that you read the CMD.EXE documentation, which is available by typing "VIEW
CMDREF" at any prompt. If you are using a different command processor, it is
of course helpful to be familiar with its feature set as well. All of the
features of CMD.EXE or the command processor of your choice are available
through CommandLine. Use them as needed to provide the desired functionality.
In this discussion, we will give examples using CMD.EXE syntax, as it is the
most commonly used command processor under OS/2. In most cases, however, these
examples can be converted to other command processor syntax.
ΓòÉΓòÉΓòÉ 13.2. Specifying the Current Directory ΓòÉΓòÉΓòÉ
Specifying the Current Directory
CommandLine allows you to specify the current directory during startup (See
Setting the Current Directory) or by using the menu option (See Changing the
Current Directory).
ΓòÉΓòÉΓòÉ 13.3. Executing a Batch file in every OS/2 Session ΓòÉΓòÉΓòÉ
Executing a Batch file in every OS/2 Session
The simplest way to accomplish this is to change the default command shell.
Specify CMD.EXE with the desired batch file as an argument and an ampersand at
the end.
Example: CmdLine -s"CMD.EXE /K MYBATCH.CMD & "
ΓòÉΓòÉΓòÉ 13.4. Executing Multiple Commands ΓòÉΓòÉΓòÉ
Executing Multiple Commands
Running a program which resides in a different directory and on a different
drive is a frequent requirement. CMD.EXE allows the concatenation of commands
using the ampersand.
Example: D: & CD\MYDIR & MYPGM.EXE
This may be lengthy to retype time after time, but not if you recall it from
history, or better yet, if it's a frequently used command, make it an alias or
a hotkey. Note that you do not need to create a batch file to handle these
types of cases.
Review the CMD.EXE documentation, which is available by typing "VIEW CMDREF" at
any prompt to learn about more features of the command shell.
ΓòÉΓòÉΓòÉ 13.5. Forcing the Invocation of the Command Shell ΓòÉΓòÉΓòÉ
Forcing the Invocation of the Command Shell
When you enter a command at the CommandLine prompt, CommandLine evaluates the
command type, so that it can be executed efficiently. Commands are passed on
to the specified command processor, while programs of various types, i.e. OS/2
fullscreen, VIO, DOS and Windows programs are started directly. This can cause
a problem with certain programs which use standard I/O to write to the screen
-- they simply finish their task and exit, without giving the user an
opportunity to view the information. To avoid this, force the execution of
these programs via a comand processor, by simply entering a space before the
program name.
Example: " MYSTDIO.EXE"
Alternatively, use the multiple command syntax discussed above, and append an
& PAUSE or a filter or redirector to the command. A frequently used
combination might be:
Example: MYSTDIO.EXE & PAUSE & EXIT
ΓòÉΓòÉΓòÉ 13.6. Accessing CommandLine's Internal Hotkeys ΓòÉΓòÉΓòÉ
Accessing CommandLine's Internal Hotkeys
In addition to all the assignable hot keys which can be set to bring up
CommandLine itself and various programs or windows, CommandLine uses several
internal hotkeys to provide shortcuts to menu options and other facilities.
They are:
1. <CTRL> <Left Arrow> for File Find.
2. <CTRL> <Right Arrow> for File Name Completion.
3. <CTRL> <Down Arrow> for File Locate via standard file dialog.
4. <PageUp> for history listbox.
5. <Up Arrow> for Previous history entry.
6. <Down Arrow> for Next history entry.
7. <CTRL> <Enter> for entering commands without entering them into history.
8. <CTRL> <Esc> To bring up CommandLine when in the tasklist.
Other hotkeys act as standard accelerators to the CommandLine menu.
ΓòÉΓòÉΓòÉ 13.7. Implementing Vertical Environments ΓòÉΓòÉΓòÉ
Implementing Vertical Environments
Many users may wish to use CommandLine for its ability to hotkey between
various applications or windows, but may be not wish the CommandLine window to
be accessible. This may be for security purposes -- the users may not have the
authority to access the "raw" prompt, or lack the knowledge to use it
effectively. The CommandLine window can be made inaccessable by simply editing
the CMDLINE.HOT file and erasing the CommandLine hotkey, which by default says
"aSPACE". Note that the line must remain in the file, only the text left of
the first semicolon should be removed. The same technique may be used on any
line in this file to both autostart and automatically restart applications
without allowing hotkey access to them.
Note: Editing the file in this manner should be done when only CommandLine is
not running, as exiting CommandLine will cause the file to be overwritten with
whichever values are in memory.
ΓòÉΓòÉΓòÉ 13.8. Replacing the Workplace Shell ΓòÉΓòÉΓòÉ
Replacing the Workplace Shell
In some cases, CommandLine users may wish to run without the Workplace Shell.
This might be due to a preference towards the command prompt interface, or by
the needs of a vertical application where access to the underlying system and
hardware limitations such as low disk space and memory availability dictate a
"less is more" approach.
The task of replacing the Workplace Shell as the standard operating environment
is an easy one. Replace the PMSHELL.EXE entries in the CONFIG.SYS file with
CMDLINE.EXE. Remember to specify the CommandLine parameters. When OS/2 boots,
CommandLine will be started, as well as any applications which were specified
as autostart to CommandLine. All of the CommandLine facilities will be
available as usual, with the exception of the Workplace Shell object creation
facilities.
The combination of the hotkey CommandLine prompt, the tasklist and hotkey
application launching and switching will give you complete access to OS/2
facilities without the overhead of the Workplace Shell.
ΓòÉΓòÉΓòÉ 14. Ordering Information ΓòÉΓòÉΓòÉ
Ordering Information
CommandLine is available directly from Soft & GUI Inc. and through various
software catalogs. Discounts are available to OS/2 users groups. Site licenses
are available.
List Price: $39.95
Soft & GUI Incorporated
2224 East 21st Street
Brooklyn, New York 11229
(718) 769-8017
Please contact us for quantity discounts and site license information.
ΓòÉΓòÉΓòÉ 15. About Soft & GUI ΓòÉΓòÉΓòÉ
About Soft & GUI
Soft & GUI Incorporated
2224 East 21st Street
Brooklyn, New York 11229
(718) 769-8017
Soft & GUI was founded in 1991, by Arthur Goikhman. In 1992, Steve Dacek came
on board and the two began development of CommandLine. The charter was to make
money by venturing into the untamed (and untrampled) regions of OS/2.
CommandLine was an idea concieved during an IBM presentation of the OS/2 2.0
Workplace Shell. While the shell can be a very effective tool to new users,
accessing the prompts or the file system can be a frustrating experience to
command prompt and mouse users alike. Please let us know of features you would
like added, or problems you encounter using CommandLine. Your feedback will
drive all future development.
Soft & GUI is currently working on several other projects: ErrorManager, a
runtime API debugger and production code monitor (which does not require the
debugging kernel); and KingMaker, a visual application development environment.