*************************** TITLE AND INTRODUCTION ****************************
        ______   __   __   _______   __   _______   _______         __   __
       / ____/\ / /\ / /\ / ___  /\ / /\ / _____/\ / _____/\       / /\ / /\
      / /\___\// /_// / // /\_/ / // / // /\____\// /_____\/      / / // / /
     / / /    / ___  / // / // / // / // / /     / _____/\       / / // / /
    / /_/_   / / _/ / // /_// / // / // /_/__   / /_____\/      / / // / /
   /_____/\ /_/ //_/ //______/ //_/ //______/\ /______/\       /_/ //_/ /
   \_____\/ \_\/ \_\/ \______\/ \_\/ \______\/ \______\/       \_\/ \_\/

 (C) Copyright Michael Otto, Holländische Twiete 6a, 2054 Geesthacht, Germany

                         A Utility Factory Production

             Last change: 04-04-92 (this file) - 04-04-92 (program)

Choice II is a menu program especially for harddisks, though you may of course
also use it to create menus for your disks. Choice II allows you to select and
start almost as many programs as you want and with every menu item a random
number of commands can be executed.

Choice II has nothing to do with Choice I except for the concept. Choice II
offers you a complex graphic user interface and you may either work with your
mouse or your keyboard.

Please enter "ChoiceII Demo.MEN" in the CLI first in order to get a rough idea
how Choice II looks like and works.

******************************** THE MENU FILE ********************************

First of all you have to edit a menu file for Choice II. It should be named
"ChoiceII.MEN" and placed in the s-directory of your boot- or harddisk. The
menu file contains all program categories and menu items.

The file should look like this:

#MENU Program_Category 1
   #ITEM gfx Program_1
   Program_1

   #ITEM prg Program_2
   assign xx: yy:
   Program_2

#MENU Program_Category 2
   #ITEM cli Program_3
   Program_3
   ...

A Choice II menu is divided in menus (or categories) and items (or programs).
There may be up to 17 categories with almost as many items as you want, but
only 150 items altogether (this can be altered, though!).

The string #MENU (which needn't be written in capital letters) introduces a
category and is followed by a space and the name of the category.

Now you should enter all the items that belong to this category. For this, type
#ITEM, a space and then a shortcut for the type of program. Possible shortcuts
are:

AUD (AUDIO)     - for any programs dealing with sounds, songs and samples
CLI (CLI)       - for CLI commands etc.
COP (COPY)      - for copy/backup programs
DIR (DIRECTORY) - for dir/disk utilities
GAM (GAME)      - for games
GFX (GRAPHICS)  - for programs dealing with graphics, pictures and animations
PAK (PACKER)    - for packers and crunchers
SER (SERIAL)    - for telecommunication programs
SYS (SYSTEM)    - for programs like monitors, debuggers etc.
TEX (TEXT)      - for text programs
TOO (TOO)       - for tools

The shortcut determines the symbol (image) that will be displayed with that
particular item. Unknown shortcuts will cause an error. Enter the name of the
the program after the shortcut, followed by a RETURN. Now you may enter as many
commands as you want.

Note! Category names mustn't be longer than 20 letters, item names mustn't
be longer than 17 letters. Too long strings will be cut.

Often called programs can also be selected via the function keys. Type the
number of the function key straight after the string "#ITEM" and then a space.
Examples:

   #ITEM3 too Program_3     <- "Program_3" will be selected by pressing F3 in
   Program_3                   the menu

   #ITEM10 too Program_10   <- "Program_10" will be selected by pressing F10 in
   Program_10                  the menu

You can also enter command parameters with Choice II. Just type #ASK as a
command, followed by a text line. Then type $$ for the parameter you want to
be replaced by the entered string. Examples:

   #ITEM dir Format Disk
   #ASK Please enter device to be formatted:
   format DRIVE $$ NAME blank NOICONS

   #ITEM cli CD <Path>
   #ASK Which path?
   cd "$$"

   #ITEM cli MakeDir <dir>
   #ASK Which directory?
   makedir "$$"
   cd "$$"

When the #ASK command is executed, Choice II opens a little window where you
can enter a text. This method allows you to call even CLI commands via a menu.

Normally, the menu reappears after the last command has been executed. You can
avoid this by entering #EXIT as the last command. Choice II will then return to
the CLI.

Choice II can also be recalled with new options: type #RECALL <new options>
for this. Do NOT call ChoiceII twice (like this: #ITEM... ChoiceII NewFile),
because this would use up MASSES of memory!

The #RECALL feature can be used to create some sort of sub-menus. Example:

#MENU Graphics
...
   #ITEM gfx Watch Pictures
   cd dh0:gfx/pictures
   #RECALL Pictures.MEN
...

Choice II will then be recalled with "Pictures.MEN" as the new menu file and
no additional memory will be used up.

If you want to print some comments in the CLI-window, then try #TEXT as a
command, like this:

   #ITEM too QMouse
   #TEXT Switch off QMouse via CTRL-LEFT AMIGA-ESC!
   run qmouse

Such texts are ALWAYS printed, even when you switched off CLI-output with
option -q (see next chapter).

*********************************** OPTIONS ***********************************

As you see from the example above, you may use a different menu file than
"s:ChoiceII.MEN"; simply enter it's name as the first argument.

You may also suppress CLI output (except for error reports). Try option 'q' for
this.

Normally, you may use at maximum 150 items per menu file, but this number
can be changed; enter i<xxx new number> as an option of Choice II.

Choice II offers you the possibility to execute a certain item automatically
when some time with no user action has passed. This can be used if you want to
the computer to continue executeing the startup-sequence with a default program
when the user is absent. For this, you have to add an 'x' to the string "#ITEM"
("#ITEMx" or e.g. "#ITEM10x") of the corresponding item. Then call Choice II
with the option -w<xx number of seconds>, where <xx> is the number of seconds
that have to pass before the item is executed. If the user does ANYTHING in the
menu during the waiting period, the auto execution will be cancelled!

The complete syntax:

ChoiceII [menu file] [-i<xxx number of items>w<xx seconds>q]

Examples: ChoiceII
          ChoiceII Sources.MEN
          ChoiceII Terminals.MEN -w15i500
          ChoiceII -q

********************************** THE MENU ***********************************

After you called Choice II, the menu file is read and the menu is displayed.
You can move the red-frame-cursor with the cursor keys. You select a program by
pressing RETURN.

You can change the program category by pressing SHIFT+cursor down/SHIFT+cursor
up. If there are more items in a category than fit in one page, you can move
one page forward/backward by pressing SHIFT+cursor left/SHIFT+cursor left.

A help page is displayed by pressing HELP. You leave Choice II without making
a selection by pressing ESC.

With F1-F10, you move the cursor to the particular item you marked in the
menu file (see "the menu file").

Everything in the menu can also be done with the mouse: click at an item
to move the cursor to it an double-click to execute it. Choose a category by
simply clicking at it.

You can change pages in a category by clicking at the up/down-arrows that
appear on the right part of the page.

You can also select an item by typing its name. Simply press <AMIGA+s> or
select "Search" from the pulldown menu. Enter the name or a part of the name of
the item you want to select and press RETURN. The cursor will then be placed to
the first item that matches your input string. Example: The input string
"basic" matches "AmigaBasic" as well as "GFA-Basic 3.0".

The help page can be called by selecting "Help" in the pulldown menu and
you quit Choice II by choosing "Quit" in the pulldown menu (who ever thought?).
You may toggle the Power-LED by selecting "Power-LED" from the pulldown menu or
by pressing <AMIGA+p>.

After you selected a program, the screen will be closed and the commands
belonging to the selected program are executed. This can be aborted by pressing
Ctrl-C. Choice II will then stay in the CLI.

********************** LIFE, THE UNIVERSE AND EVERYTHING **********************

Please don't mock at my English, I never claimed to write perfect English,
maybe you even laughed when reading some phrases... (by the way... I don't
mock at your GERMAN either!)

The CLI command "run" is NOT necessary for Choice II. Most other DOS-command-
executeing programs need "run", so I think I gotta brag a little.

The program uses up about 31kB while the commands are executed. If you are
short of memory, execute the last command in a command list with "run" and
then immediately EXIT, like this:

   #ITEM too I need much
   assign xx: yy:
   run Big_Program
   #EXIT

This program is has been programmed VERY (is that possible?) closely to
multitasking conventions. No BUSY-Loops are used, of course, all required
resources are closed orderly (I hope) and GURUs are always caused by The Other
Programs (but I guess, The Other Program's programmers also claim this of their
programs...).

Be aware of the fact that Choice II is kept in memory while other programs are
executed. And those programs might destroy memory needed by Choice II, which
can lead to an error that seems to be caused by Choice II, but isn't.

Finally some hellos to Marco, Daniel, Rossi and Schulz! [Sorry for that, it's a
bit like in a cheap TV-show, eh?]

****************************** COPYRIGHT REMARKS ******************************

Use this program at your own risk. I don't gurantee anything.

Special thanks to Thorsten Gau once more. Thorsten did some debugging and he
really gave me some good pieces of advice about what to improve.

This program is FREEWARE, i.e. you may copy it anyone you like if you don't
make money with it. The copyright is still MINE, so commercial use is not
allowed. The use in atomic reactors or weapon factories is prohibited. If you
like Choice II, feel free to send me money, tokens or whatever you think I
might appreciate. The program Choice II mustn't be distributed without this
file. If you want to add Choice II to your own pd-series, you have to ask me
for permission first. The source code is available from me for DM 20 or US $15.

Attention: You shouldn't have paid more than US $3 (DM 4) for this disk!
           If so, change your dealer!

Choice II can be spread in either archiv format (ARC, ZOO, LHARC) or in a
single directory on a disk. These files have to be in the archiv/directory:
ChoiceII, ChoiceII.DOC, Demo.MEN.

If you find bugs or want to make suggestions concerning the program, please
contact me! In Germany you can reach me via Zerberus-Net; send your messages to
MICHAEL_OTTO@ANM.ZER. Otherwise write to the address given at the top of this
text.

*********************************** HISTORY ***********************************

Program versions below 1.2 were only given to Thorsten Gau, I hope he didn't
spread these undebugged versions too much.

1.00 -> 1.02
------------
- commands can now be aborted via CTRL-C
- new design for selected categories
- icon type CLI added, icon type PRT (printer) removed
- minor bug in jump-to-funcion-key-item routine discovered and fixed
- new design for error/help output
- minor bug in recall function removed: Choice II sometimes drew boxes
  anywhere on the screen after a restart

1.02 -> 1.03
------------
- now ALL $$ in a command list are replaced by the string you entered via #ASK,
  not only the first one

1.03 -> 1.1
-----------
- search function added

1.1 -> 1.2
-----------
- slight error in search function removed
- "Search" is not «ENABLED» on the help page anymore
- Choice II should now free all required memory properly (repaired four times)
  -> 81..9 gurus should not appear that often anymore
- string gadget is not «STRINGCENTER»ed anymore
- Choice II now tells you WHICH item can't be recognized
- options 'c' and 'q' added

1.2 -> 1.22 (first officially released version on MACRO PD)
-----------------------------------------------------------
- #TEXT-command added

1.2 -> 1.23
-----------
- some new CLI-colors implemented
- Power-LED can now be toggled (VERY useful...!?)

1.23 -> 1.3
-----------
- AmigaDOS 2.0-Look implemented, "alternative color"-option removed
- now up to 17 chars per menu item possible
- time auto execution implemented

************************************* END *************************************

