*************************** TITLE AND INTRODUCTION **************************** ______ __ __ _______ __ _______ _______ __ __ / ____/\ / /\ / /\ / ___ /\ / /\ / _____/\ / _____/\ / /\ / /\ / /\___\// /_// / // /\_/ / // / // /\____\// /_____\/ / / // / / / / / / ___ / // / // / // / // / / / _____/\ / / // / / / /_/_ / / _/ / // /_// / // / // /_/__ / /_____\/ / / // / / /_____/\ /_/ //_/ //______/ //_/ //______/\ /______/\ /_/ //_/ / \_____\/ \_\/ \_\/ \______\/ \_\/ \______\/ \______\/ \_\/ \_\/ (C) Copyright Michael Otto, Holländische Twiete 6a, 2054 Geesthacht, Germany A Utility Factory Production Last change: 25-05-92 (this file) - 25-05-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 16 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 (TOOL) - 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 #ASK Which path? cd "$$" #ITEM cli MakeDir #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 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). If you want to enter a text for Choice II's title bar, try the #TITLE command anywhere in the menu file: #TITLE Incredible Inc. proudly present their demo collection The title text may contain up to 56 letters. Too long strings will be cut. *********************************** 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. Use option 'g' for german language mode. Normally, you may use at maximum 150 items per menu file, but this number can be changed; enter i 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 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, where 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] [-iwqg] Examples: ChoiceII ChoiceII Sources.MEN ChoiceII Terminals.MEN -w05i030 ChoiceII -qg ********************************** 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 Amiga-Q. 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. 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. Why did I include that option? I don't know. 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 (by the way... what about your GERMAN?). 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 33KB 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 may 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! And of course to Maren and Simone (...that's how to start rumours). ****************************** 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. 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, LHA etc.) or in a single directory on a disk. These files have to be in the archive/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 (published in the ZERBERUS-Net) ------------------------------------------- - AmigaDOS 2.0-Look implemented, "alternative color"-option removed - now up to 17 chars per menu item possible - time auto execution implemented 1.3 -> 1.31 ----------- - Bug fixed: Menu items "Help" and "Search" were disabled after user pressed F1-F10 in help page 1.31 -> 1.4 ----------- - German language supported - "Search" function removed (because it was just a waste of memory) - new graphics, few design changes - now only up to 16 categories possible (because of new graphics) - TITLE option added ************************************* END *************************************