home *** CD-ROM | disk | FTP | other *** search
- AddMenu V1.56 (25th Sep 1991) by Nic Wilson
- -------------------------------------------
-
- Written totally in Assembler
- ----------------------------
- using Hisoft Devpac Amiga
- -------------------------
- on an Amiga A3000 25mhz
- -----------------------
-
- Nic Wilson Software
- 138d South Street
- Toowoomba Qld 4350
- Australia
- Ph (076) 358384 Work or FAX
- (076) 358539 After hours
-
- EMAIL {cbmvax|cbmehq}!cbmaus!wilson!nic@uunet.uu.net
-
- This Version has been placed on Shareware for your enjoyment.
- You may distribute it freely as long as this document and the
- program remains unmodified, and accompanies the program.
- You may modify the script files as examples as long as you
- FULLY test them before distribution.
-
- **************************************************************
-
- THIS VERSION IS ONLY A TASTE OF WHAT IT TO COME. VERSION 2.00
- IS NEARING COMPLETION AND HAS MUCH MORE POWER. IT ALLOWS ICON
- ITEMS ON SCREEN THAT CAN BE COMPLETELY CHANGED EACH TIME A NEW
- SCRIPT IS LAUNCHED. THIS GIVES IT MUCH MORE POWER THAT OTHER
- PROGRAMS AROUND LIKE ADDMENU. ADDMENU V2.00 WILL BE A
- COMMERCIAL PROGRAM BUT THE ASKING PRICE IS VERY REASONLBLE
- AT $20.00 AND THIS ALSO GIVES YOU FREE UPDATES AND THERE ARE
- OTHER UTILITIES ON THE DISK!!
-
- SEND FOR YOUR VERSION TODAY AND YOU WILL BE FIRST IN LINE
- WHEN THE VERSION IS COMPLETE. IT SHOULD BE READY BY THE
- TIME YOU READ THIS.
-
- **************************************************************
-
-
- FUNCTION
- --------
- Add an infinite number of Menu Items to the Workbench Tools
- Menu in Kickstart V2.0 using script files. Updating is
- possible from the menus, from CLI or from Workbench using
- different script files. Temporary menu items can also be
- added that stay in the menu strip after updating to the new script,
- and can also be converted to permanent and saved to your script
- file automatically.
-
- REQUIREMENTS
- ------------
- Any Amiga running V2.0 of Kickstart and Workbench including
- the A3000. Tested to versions 37.175 Kickstart and Workbench 37.66.
-
- HISTORY (Recent first)
- ----------------------
-
- V1.56 Changed all the functions in the update window so they
- return to the update window when their job is complete.
- This I thought was better then exiting the update window.
- Checked the program thouroughly with enforcer.
-
- V1.55 Added a new -s switch and completely changed the update
- window, to add the ability to save temporary menu items
- as permanent to the current script. See -s option.
-
- Added a 'MAKE NEW SCRIPT' gadget to the update window. See
- 'MAKING A NEW SCRIPT FILE AUTOMATICALLY' for more info.
-
- Removed the string gadget in the update window and
- replaced it with a gadget that opens the asl.library file
- requester. It defaults to S: where I expect most users
- would keep their script files, and it defaults to matching
- files with the pattern add#?.
-
- Added a 'Delete item from current script' function. See
- 'DELETING AN ITEM FROM THE CURRENT SCRIPT' for more info.
-
- Added a 'Reposition' function. This allows any items within
- the current script to be repositioned in any order. See
- 'REPOSITIONING ITEMS WITHIN THE CURRENT SCRIPT' for more info.
-
- Fixed a bug that must have been in for a while. AddMenu would
- not launch with a script other than the default one. This is
- now fixed.
-
- AddMenu can now be launched without any script files at
- all and be configured completely by the update window and
- dumping icons over its icon.
-
- AddMenu now hangs around a while if Workbench is busy on
- launch, and retries a few times before exiting.
-
- V1.54 Removed ability to run from Workbench because of severe
- problems in DOS being able to find things. Run it from the
- user-startup and it is much better.
-
- V1.53 Changed launch code so the program can be called before
- Workbench is available. This allows the program to be called
- from the user-startup instead of the startup-sequence. The
- program will detach itself and then hang around and wait
- until workbench is available before installing. Also changed
- it so it can be launched from Workbench and gave it a commodity
- icon. You can drag this into the WBSTARTUP drawer to launch
- it if you prefer. If you do it this way the default script
- MUST be s:addmenu.script as WB parameters are not supported
- yet.
-
- V1.52 Very sorry but the new about function didn't work in hi-res.
- I only use interlace and I negelected to test other resolution
- modes. It is now fixed.
-
- V1.51 Added an 'About' menu automatically, this allows for easy
- identification of version number, author and info on its
- free distribution permission. The 'About' menu will always
- be at the top of any function you have added in your script.
-
- V1.50 Fixed bug. When updating to new script, old script memory
- buffers were not being freed.
- Added ability for each menu item to have more than one
- executable(See 'COMMAND STRINGS' or 'EXAMPLE SCRIPT' BELOW).
-
- V1.41 Stopped illegal devices, drawers or non-executables
- being added to the menu strip. These will cause
- workbench screen to flash.
- Added switch for temporary menus, so you do not have
- to have the icon around if you do not use them.
- Added the ability to remove the temporary menus alone.
- V1.42 Fixed bug. If Temporary menus were removed, they would
- magically reappear when a script was changed.
-
- V1.40 New temporary menus via workbench icon added
- and ability to update or remove from this icon.
- V1.31 Optimised and fixed error msg for illegal use
- under kickstart V1.3.
- Fully checked with 'Enforcer' for bugs.
-
- V1.3 Added ability to change scripts on update.
-
- V1.2 Added quit and update options.
-
- V1.1 Added ability to use different script name/path.
-
- V1.0 Original release.
-
- IMPORTANT
- ---------
- DO NOT USE RUN OR RUNBACK, ADDMENU WILL RETURN THE CLI
- TO YOU AND ALLOW IT TO CLOSE WHEN YOU GIVE AN ENDCLI.
-
- ADDMENU WORKS IN RATHER A SPECIAL WAY, IN ORDER TO ALLOW THE
- CLI WINDOW TO CLOSE AFTER LAUNCH IT RELAUNCHES ITSELF AGAIN
- WITH SPECIAL CODE, THIS IS DONE TO OVERCOME ALL THE NORMAL PROBLEMS
- ASSOCIATED WITH THIS.
- YOU WILL NOTICE THAT SOME PROGRAMS LOSE THE PATH, STACK,
- CURRENT DIRECTORY ETC. THIS IS ESPECIALLY TRUE OF PROGRAMS
- WRITTEN IN C. ADDMENU DOES NOT SUFFER FROM ANY OF THESE
- PROBLEMS. POPCLI TYPE PROGRAMS SUFFER BADLY FROM THIS, MY
- AUTOCLI USES THIS SAME CODE AND SUFFERS NO PROBLEM. IT IS
- PUBLIC DOMAIN SO SEND S.S.A.E. AND DISK FOR THE LATEST VERSION.
-
- USAGE
- *****
- AddMenu [script] [switch]
-
- Standard redirection of output is supported.
- EG. Addmenu >nil: [script] [switch]
-
- [switches]
-
- -s AddMenu must already be running for this switch to be used.
- is used to inform the running version that you wish to convert
- any current temporary menu items in the current menu strip to
- permanent and save them to the current script. This allows you
- to add items to each script file without having to manually
- edit the script yourself. This can also be done from the update
- window accessed from AddMenu's special icon.
-
- -q AddMenu must already be running for this switch to be used.
- This switch allows the currently running AddMenu to be removed.
- If AddMenu is not found running an error message will result.
- If this switch is used then it must be the only parameter.
- To remove from workbench see 'To Remove Addmenu Completely'
- below.
-
- -t Do not use temporary menus and do not place the icon on the
- Workbench screen.
-
- [script]
- This is an optional parameter, and can be used when AddMenu is
- first launched or when updating. By default it reads a script
- created by you, called 'addmenu.script'. This file is expected
- to be in the S: directory , but if you wish to supply a
- different path and name you can use the script parameter. If
- this parameter is used you must supply the path to the file and
- its name. There is an example file that accompanies this file
- to show you how to create it. Below is an explanation of the
- script file.
-
- EG. AddMenu DH0:s/addmenu.myscript
-
- or
-
- AddMenu s:addmenu.myscript
-
- FROM Workbench
- --------------
- This ability has been removed.
-
- TEMPORARY MENU ITEMS
- ********************
-
- This function will default to on unless the -t switch was
- used at launch. AddMenu will place a special icon on the
- workbench window. If a program is dragged and dumped over
- this icon, that program will appear at the bottom of the
- menu strip. The program itself will not move at all and
- doing this is quite safe. These temporary menus will survive
- an update that changes to a different script. They will
- continue to appear on the bottom of whatever script you
- update with. Once added they can be removed without removing
- AddMenu completely by double clicking on the special icon and
- selecting the 'Remove Temporary Menu Items' gadget from the
- window. If any illegal device or non-executable file is
- dumped over the icon the screen will flash and a beep sound
- will be heard, and it will not be added to the menu.
- These temporary menu items can be converted to permanent and
- saved to the current script by choosing the 'Save Temporary...'
- gadget from the update window or by launching AddMenu again
- with the -s option.
-
- ADDMENU's SPECIAL ICON
- **********************
-
- This icon does not behave like a normal icon, it is a special
- icon that allows manipulation of AddMenu from the workbench.
- Double clicking the icon will open a window with some gadgets.
- These gadgets allow AddMenu to be removed, temporary menus
- removed, updating a script or to cancel the operation etc. They
- are all explained in the relative sections below. This icon
- has not been given any specific position on the workbench window.
- Workbench will choose the best position for the icon, it can
- of course be dragged to any place you wish.
-
- CANCELLING THE WINDOW
- *********************
- If you double clicked the special icon, the window opened, and
- you changed your mind and wish to exit without changes. Click
- the 'CANCEL' gadget or the CLOSE gadget on the window. This will
- abort the operation and AddMenu will be unchanged.
-
- SAVING TEMPORARY MENU ITEMS TO THE CURRENT SCRIPT FILE
- ******************************************************
-
- From CLI
- -------- Launch AddMenu again with the -s switch. This will tell AddMenu
- to convert the current temporary menu items to permanent and
- save them to the current script file. After this is done the
- menus will be updated to reflect the temporaries as permanent.
- This save option can save one or more temporary menu items
- in one go. You could also place 'AddMenu -s' into each script
- file you use so it can be chosen from each menu, instead of the
- CLI or update window.
-
- From Workbench
- --------------
- Double click the special AddMenu icon that appeared on the
- workbench window when AddMenu was launched. A window will
- open. Click the 'Save Temporary Menu Items to Current Script'
- gadget. If no temporary menus are found then this gadget will
- be ghosted.
-
- TO REMOVE THE TEMPORARY MENUS
- *****************************
- From CLI
- --------
- Not possible.
-
- From Workbench only
- -------------------
- Double click the special icon that appeared on the Workbench
- window when AddMenu was launched. Click the 'Remove Temporary..'
- Gadget. All temporary menus will be removed. They cannot be
- removed individually unless you convert them to permanent with
- the 'Save Temp..' gadget and then the 'Delete Item..' to delete
- specific ones.
- If there are no temporary menus then the gadgets will be ghosted.
-
- DELETING AN ITEM FROM THE CURRENT SCRIPT
- ****************************************
-
- From CLI
- -------- The only way from CLI is to edit the script manually with an
- editor.
-
- From Workbench
- --------------
- Double click on the AddMenu icon and a window will open. Click
- on the 'Delete item from current script' gadget and another window
- will open, this window will show all the items in the current
- script. Each item is a toggle select gadget. Choose one or
- more entries to delete and when finished click the 'DELETE' gadget
- and they are gone. You may abort this function with the 'CANCEL'
- gadget.
-
- REPOSITIONING ITEMS WITHIN THE CURRENT SCRIPT
- *********************************************
-
- From CLI
- -------- The only way from CLI is to edit the script manually with an
- editor.
-
- From Workbench
- --------------
- Double click on the AddMenu icon and a window will open. Click
- on the 'Reposition an Entry in Current Script' gadget and another
- window will open, this window will show all the items in the
- current script. Each item is a toggle select gadget. Choose two
- entries to swap place and they will swap. Keep doing this until
- all entries are in the position you desire them to be. When
- finished click the 'SAVE' gadget and your script file and the menu
- strip will be updated to reflect these changes. You may abort
- this function with the 'CANCEL' gadget.
-
- UPDATING ADDMENU ONCE RUNNING
- *****************************
- From CLI
- --------
- If AddMenu is already installed when launched again, then it will
- send a message to the running version to update itself, If no
- script is supplied then it will update from the default file.
- A different script can be supplied as the update, and because this
- update can be called from inside an AddMenu script, this allows
- you to change the entire menu, by calling a menu function.
- This allows for an infinite number of available menu functions.
- If a different script is supplied to the current one then it will
- be totally replaced in favour of the new script. This new script
- could of course have an option to return to the original or any
- number of other scripts.
-
- From Workbench
- --------------
- Double click the special AddMenu icon that appeared on the
- workbench window when AddMenu was launched. A window will
- open. Click the 'Change Tools Menu to different Script' gadget,
- and a file requester will appear. This file requester has a
- pattern matching string gadget that will default to showing
- all files that begin with 'add'. I suggest that you call your
- scripts addmenu.????? to take advantage of this, otherwise you
- may click in the 'Pattern' gadget and change the display pattern.
- Select your new script file, then the menus will be updated if
- your new script was valid.
-
- TO REMOVE ADDMENU COMPLETELY
- ****************************
- From CLI
- --------
- Launch AddMenu again with the -q switch. (SEE Usage Above)
- This could also be done by placing an entry in your script
- file so quitting could be done from the menus.
-
- From Workbench
- --------------
- Double click the special icon that appeared on the Workbench
- window when AddMenu was launched. Click the 'Quit Addmenu'
- Gadget. AddMenu will be completely removed.
-
- THE SCRIPT FILE
- ***************
- The maximum number of items allowed in each menu script
- is 63. This is not a limitation of AddMenu, but a limitation
- that Workbench has placed for the tools menu. I do not
- recommend using that many anyway, as they would be too
- cluttered. Use less per menu and make more scripts.
-
- MAKING A NEW SCRIPT FILE AUTOMATICALLY
- **************************************
- AddMenu can make a new script file for you automatically if
- you wish. To do this select 'MAKE NEW SCRIPT...' from the menu
- and a file requester will open and prompt you for a new file
- name for the script. The S: directory will be the default
- directory that the file requester will open in and the default
- pattern matching will be add#?, you may change this if
- desired. Type a new file name or select an old one to overwrite
- and click on the LOAD gadget. This new empty file will be
- created on the disk, and the menus will be removed, with only
- the 'ABOUT ADDMENU' and MAKE NEW SCRIPT...' items available.
- Drag programs you wish to place in this new script and dump
- them over the AddMenu Icon. If the program you want to place
- in there does not have an icon, then select the 'All Files'
- sub-item from the 'Show' item of the Window menu of the workbench
- window. This will give all files and drawers a fake icon in the
- current window, keep doing this until you get to your file.
- After you have placed all required files in the new menu,
- double-click on the AddMenu icon and select 'Save Temporary Menu
- Items to Current Script'. The new script will be updated and
- will now be available.
-
- MAKING A NEW SCRIPT FILE MANUALLY
- *********************************
- The script file is a group of commands you would like in the
- menu along with the text you want in the actual menu.
- The format of this script is important for the program to read
- it correctly. If the number of menu items in a single script
- overflows the screen height, the menu strips will be made
- wider and the items split into columns. The maximum number
- of menus items in a single script is 63, but due to a bug
- in workbench.library this is not checked for, any extra menus
- over this amount will be clipped, athough I dont forsee anyone
- placing this many in a single script. The structure of the
- script file is as follows.
-
- TEXT STRINGS
- ++++++++++++
- The text strings are actually placed in the menu, and each one
- must be before its command string. The Text string MUST START
- and END with a plus (+) sign.
-
- COMMAND STRINGS
- ***************
- The command strings are the strings that are sent to DOS when
- a menu item is selected. Each one MUST come directly after
- its text string and START and END with an asterisk (*). There
- are now any number of commands allowed per text string,
- DO NOT USE THE 'RUN' COMMAND WITHIN A COMMAND STRING, 'RUN'
- WILL BE ADDED TO THE FRONT OF YOUR STRING AUTOMATICALLY.
-
- END OF FILE MARKER (IMPORTANT!!)
- ################################
-
- The script file MUST END with a hash (#) sign on the beginning
- of a new line.
-
- COMMENTS
- ;;;;;;;;
- Comments are allowed in the script file but must follow certain
- guidelines. They are allowed on a line of their own or beside
- a text string or command string. They must be outside the command
- or text string characters. The best way to ensure this is to
- leave at least one space before the beginning of the comment after
- the rightmost plus (+) or asterisk (*) of each comment or text
- string. They MUST NOT use the plus (+) sign, the asterisk (*)
- or the hash (#) sign within the comment, as these three
- characters are used to specify the beginning and end of command,
- texts strings or end of file. Comment lines are completely
- optional, you do not have to have any at all.
-
- EXAMPLE OF A VALID SCRIPT
- -------------------------
- ;this is a valid comment
- this is a valid comment
- this is still a valid comment
- +NEWSHELL+ ;Text for the menu surrounded in plus signs
- *c:newshell* ;commands surrounded in asterisk signs
- comments are allowed between menu strings
- +NoVirus+ this is still a valid comment
- *dh0:novirus* notice the path to the above command
- +WordPerfect+
- *assign WP: dh0:wp* an example of multiple commands
- *assign PRINT: dh0:wp* with a menu entry.
- *assign SPELL.THES: dh0:wp*
- *cd wp:*
- *wp*
- +XCOPY+ to assign and run it
- *dh0:copiers/xcopy*
- +Quit Addmenu+
- *addMenu -q* ;how to make AddMenu quit from the menus
-
- +Another Menu+ ;how to change menus from a menu
- *addmenu s:different.script* ;(updating AddMenu)
- #
- Notice the 'end of file' marker (#) on the end of the script.
- This is very important.
-
-
- Please send comments, bug reports etc to the address at the
- top of this file.
-
- Nic Wilson
-
-
-
-
-
-
-
-
-