home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
pcmagazi
/
1992
/
11
/
mc
/
mc.doc
< prev
next >
Wrap
Text File
|
1992-05-19
|
14KB
|
262 lines
MC.EXE (Version 1.0)
------------------------------------------------------------------------
Barry Simon June 16, 1992 (Utilities)
------------------------------------------------------------------------
MC: A utility that puts file-management and program-launching functions
in the same window and makes it easy to run programs in Windows.
MC is based on the premise that there are three ways you'll typically
want to start programs from Microsoft Windows: First, you'll often want to
pick an application from within a preset program group. This is one of the
Program Manager's main features, of course, but when you've built up many
groups, juggling their windows is more of a nuisance than the grouping is
worth. MC forgoes the pretty icons in order to give you quick access to a
large number of programs without so much clicking and dragging. And since
you've probably invested some effort already in setting up Program Manager
groups, MC lets you import your existing program sets intact.
Second, you'll sometimes want to locate a file by browsing a directory
tree and then launch the program from there. You can do this with the File
Manager, but the separation of the File Manager from the Program Manager is
awkward. Windows 3.1 addresses this problem by adding a Browse button to the
Program Manager's File/Run command, but even with that, it still takes several
keystrokes to do the job. With MC, the drive/directory/file boxes are visible
and available right on the main screen.
Third, you'll sometimes want to enter a command directly, as you
would by using the Program Manager's File/Run option. But File/Run suffers
from the same defect that afflicted the DOS command line until DOS 5.0's
DOSKEY came along: It has no memory. You can't just reissue a command you
used earlier. So MC's third design goal was to enhance the Run command
with a list of your most recent commands, which you can recall, reissue,
and even edit. The history list includes not only programs that you
launched from the command line, but programs you started from the directory
tree as well.
After copying MC.EXE and VBRUN100.DLL to your hard disk you can
install the program and locate its icon in the Program Manager with the
File New command. Note that MC is intended as a program launcher. Because
of a limitation of Visual Basic, you can't use MC as your primary shell
loaded via a SHELL statement in your SYSTEM.INI file. In discussing how
to run MC, I'll start by assuming that you're using a mouse. If you want
to use the keyboard instead, refer to the "Keyboard Usage" section below.
ADDING PROGRAM MANAGER GROUPS
The first time you start MC, the list shown in the left column of
the main screen will be blank and the title at the top of the window will
say MC. Notice that there are no menus in the screen. Button bars and other
shortcuts that avoid time-wasting menus are becoming so popular that I
decided to push this approach to the logical extreme of providing button
shortcuts for everything in MC.
The first thing you'll want to do is to add your Program Manager
groups to MC's group list. Before doing so, it's a good idea to hit the
Add button in the second column and create a (temporarily empty) group
called Main Programs, which MC will thereafter display when you load it.
You'll probably want to customize the contents of the Main Programs group
rather than simply bring up the first of your Program Manager groups by
default each time.
To add your existing Program Manager groups, hit the Configure button.
Ignore the busy screen for the moment and press the button labeled Load
Program Manager Groups. That will bring up a third dialog box, with a list
of your current Program Manager groups.
Unless you have a special reason for not adding all your established
groupings to MC's own group listing, just hit the Process Selected Groups
button. If you have more than 7 groups, or if any group has more than 16
programs in it, a message will inform you that some parameters need to be
increased and it will ask permission to save the changed parameters in the
MC.INI file. If that message appears, answer yes.
Either way, MC will then process your Program Manager groups by adding
them to its own group list, and you will be taken back to MC's Configure
screen. Hitting OK there will return you to the main screen. If you press
the arrow next to the word ``Group'' in the leftmost column, you'll get a
drop-down list of all your groups, starting with the (empty) Main Programs
group that you added at the start. If you choose one of the Program Manager
groups, the list below the drop-down box will display the names of the
programs in that group.
LAUNCH BASICS
The simplest way to launch a program is to double-click on it from
either the group lists or the file list. To see how this works, just pick
a small Windows application from those lists (for example, CLOCK.EXE from
the Accessories group) and double-click on it. The program will launch in
normal size.
Instead of double-clicking, you can click only once and then use the
buttons in the Run box in the lower-left-hand corner of the screen. As
the button names indicate, the program can be launched in normal mode,
as a full-screen application, or as an icon, depending on which button
you press. (If you're at your machine, be sure to close the multiple
copies of CLOCK that you've now opened!)
Now notice the Minimize MC check box to the right of the Run box.
If you click on it before launching, MC will automatically be minimized
when you launch an application. If you want, you can tell MC in its
configure screen always to recheck that box after a launch so the default
will be to minimize before launching.
Next, look at the History drop-down box. It will be blank the first
time you load MC, but it won't be after you've made some practice launches.
If you click on the History arrow you'll get a list of all the programs
you've recently started from MC. By default, the history list keeps the
last 20 commands that were issued, but you can adjust this value in the Configure
dialog box.
You can also type commands into the History box. For example,
entering
NOTEPAD C:\AUTOEXEC.BAT
will call that file into Notepad. Isn't that easier than clicking around
to find the root directory? If you just type in
C:\CONFIG.SYS
and hit Enter, you'll get a message offering to load that file into
Notepad. Whenever you try to run a file without an associated extension,
MC will offer to load it into Notepad. It will also offer to run Notepad
if you configure it to display ``All Files'' in the file display and
double-click on a file that has an unassociated extension.
MC recognizes one special command word when you type in a command.
CDD is interpreted as "change drive and directory." Thus, if you enter
CDD D:\PROGRAMS\EXCEL
MC will change the underlying DOS drive to D: and the directory to
\PROGRAMS\EXCEL. The current directory isn't usually important to MC,
since MC changes it in response to a file launch or group launch. But
since you might want to change the directory before running a program
from the command line, CDD has been provided.
There are four buttons to the right of the Group list box that can
affect its contents:
ADD can be used to add a new group or add an item based on either
the history list or the file list. Which is used depends on which
you clicked last. So to add a file, click on it once (not twice,
which would launch it) and then click on the Add button.
DELETE will delete an item or an entire group, depending on which
radio button you push in the dialog box.
RENAME lets you change the name that appears in the Group pull-down
or in the item list. Click on the item you want to rename and then
on this button.
PARAMS displays the drive/directory used by an item in the group
and lets you add or edit parameters passed to a program you enter
on the command line.
THE FILE LAUNCH LIST
Now that you understand how the groups and the history list work,
focus on the three objects in the middle of the main screen, to the right
of those four buttons. Here you'll find an untitled file list, a directory
list (indicated with file folders), and a drop-down list of disk names.
You might intuitively feel that these are placed in the wrong order --that
the drive list belongs on the top left and that the file list should be to
the right of the directory list. I selected the actual placement to conform
to the new Common Dialog arrangement introduced with Windows 3.1 and used
already in many applications introduced after September 1991. This is what
you'll have to get accustomed to!
The lists are linked together, so changing the directory in the
directory list will change the executables displayed in the file list.
(Data files are not shown in the file list unless the All Files box in
the configure screen has been checked.) Double-clicking on a program
will launch it in normal size. Alternatively, clicking once and hitting
one of the Run box buttons will launch the chosen application in maximized
or minimized form. As you single-click on an item in the file list, the
caption in the Run box changes to indicate exactly what MC will launch.
Files launched from the file list then appear in the history list.
MAIN-SCREEN MISCELLANY
Finally, on the main screen, look at the rightmost column. The Save button
will save your groups, items, and history to MC.INI. If you started with a
lot of Program Manager groups and items, your first save could take more
than a few moments. After that, however, only the History list and changed
groups will normally be saved, so the save will take less time. If you try
to exit MC with unsaved changes or an unsaved history, you'll be warned
and given a chance to save to MC.INI.
Skip the Configure button for the moment and look at the radio buttons
in the box marked Caption. These affect the title of the main MC window.
When you pick Date Time, MC will act as a clock/date reminder even when
minimized at the bottom of your screen. The last three buttons (About,
Help, and Exit) are self-explanatory. Note that because MC changes to the
directory of a program you wish to launch as the program is run, MC.HLP
must be on your path or in the Windows directory.
KEYBOARD USAGE
MC is really a huge dialog box and, like most dialog boxes, it's
best driven with a mouse. If you don't like mice, or if you like to use
keyboard shortcuts, MC supports keyboard operations, too. First, Tab and
Shift-Tab will switch the input focus (indicated by a dotted-line box)
forward and backward around the screen, respectively. So, for example,
you could launch a file by tabbing to the file list and using the Arrow
keys and Enter. The tabbing order was chosen to prioritize the items I
expect you'll use most heavily rather than to reflect the physical
arrangement of the items that appear on the screen.
Pressing Alt together with the underscored letter on objects on the
MC screen will immediately execute the corresponding command. For example,
Alt-Y will change the focus to the history list. And as with any
Windows-standard drop-down list, Alt--Down Arrow will open the list.
Three lists don't have visible names but still have accelerator
keys. Alt-V, Alt-D, and Alt-F take you to the driVe, Directory, and File
lists, respectively. Within the lists, the Up Arrow and Down Arrow keys
take you from one item to the next. Pressing F1 will invoke Help from
anywhere in the program.
THE CONFIGURE SCREEN
Hitting the Configure button pops up a screen from which you can change
many of the MC defaults. Basically, this is a set-and-forget screen,
which you've already used to import your Program Manager groups. The box
on the left, labelled Date/Time Options, controls the format that MC uses
to display the time or date and time. If you change one of those items, a
box will pop up showing you how the date and time will look after your
modification.
The Launch Choices box determines two things. The Minimize MC
When App Runs check box works with the Minimize MC box on the main
screen. Whether MC actually minimizes itself is determined entirely by
whether the check box on the main screen is checked or not. The box on
this secondary form simply sets a default. If you check this box, then
each time you launch an application from MC, the Minimize MC box will be
checked for the next launch. Thus, if you normally want to minimize MC
upon launch, you should check this box on the configure screen. If you
decide that you'd like to override the default one particular time, just
uncheck the Minimize MC box on the main screen before that specific launch.
The DoubleClick Option allows you to set which of the three options
is used when an item is double-clicked. The Files Displayed dialog box
determines which extensions are displayed in the file list. Checking the
All Files box results in the listing of data files as well as executables.
The Associations check box refers to the extensions singled out in the
[Extensions] section of WIN.INI. Note that because of a limitation of
Visual Basic, if you have more than 25 items in that list, only the first
25 are displayed.
Finally, there are drop-down lists for setting the maximum number
of groups and items, and for setting how many items are kept in the
history list. These values might be better handled with a spin control,
which would show numbers with little arrows next to them and let you
increase or decrease them one at a time. But while third-party spin
controls are available for Visual Basic, I decided to limit this project
to what can be done to the drop-down lists with the unadorned version of
Visual Basic.
Barry Simon is a contributing editor of PC Magazine.