ScriptTool V1.02 Copyright (c) 1993 by Jan Hagqvist COPYRIGHT Copyright (c) 1993, Jan Hagqvist, All Rights Reserved. This program is FREEWARE. You may freely use and distribute this program under the following conditions: 1) No modifications are made into the program or this documentation and all the files are spread together. However, you are allowed to compress all the files into an archive for distribution. 2) No money (other than nominal copying fees) is charged for its distribution. DISCLAIMER THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. THE AUTHOR WILL NOT BE LIABLE FOR ANY DAMAGES, DIRECT, INDIRECT, INCIDENTAL OR CONSEQUENTIAL, RESULTING FROM THE USE OF THE PROGRAM. THE ENTIRE RISK AS TO THE USE OF THIS PROGRAM IS ASSUMED BY THE USER. What is ScriptTool? ScriptTool is a Workbench-utility which makes it possible for you to execute commonly used scripts or programs from Workbench's Tools- menu. ScriptTool needs DOS2.0 (V36) or better. How does it work? ScriptTool uses workbench.library's AddAppMenuItemA function to add userdefinable menuitems to Workbench's Tools-menu. How do I use it? To use ScriptTool, you need to copy ScriptTool into your Sys:c drawer. You also need to write a script, which describes the menu items you want to add. The script file is called ToolScript and it needs to be placed into your Sys:s drawer. The format of the script file is: Menu-item 1 ; These are the texts to appear in the . ; menus, they should tell what this . ; command/script does. One line per item. Menu-item x ; Max 49 bytes per line ; This is very important! Command 1 ; These are the commands/scripts to be . ; executed when the respective menu-item . ; has been selected. One line per item. Command x ; Max 99 bytes per line ; This is important too! Example Let's assume that, You want to add the following commands to the Tools-menu: DiskCopy df0: to df1: Palette ScreenMode Virusc all these are in the Sys:c drawer. You also want to add the following script to the Tools-menu: ; This script moves all the files from RAM: to DF1: Copy Ram:#? Df1: Delete Ram:#? the script is in the Sys:s drawer and it's called BackUpRam. The ToolScript would be as follows: Copy DF0 to DF1 Change palette New screenmode Virusc BackUpRam Sys:c/DiskCopy df0: to df1: Sys:c/Palette Sys:c/ScreenMode Sys:c/Virusc Sys:s/BackUpRam Also have a look at the example-drawer. You should copy the s, prefs and wbstartup drawers to your sys:s, sys:prefs and sys:wbstartup respectively. Note that the script 'ScriptTool' in the wbstartup- drawer needs IconX to be in c: drawer. The example uses c:virusc, c:ed and sys:prefs/screenmode. Notes - To run ScriptTool from Shell, use 'run' to execute it. - To run ScriptTool from Workbench, use 'IconX' to execute it. - To use scripts the 'Execute'-command needs to be in the c: drawer. - Remember to set the 's'-flag in your scripts, using the 'Protect'- command ('Protect script1 +s'). - ScriptTool should accept any dos-command/script. - ScriptTool is able to handle 49 menu-items. Each itemtext may be 49 bytes long. Each scripttext may be 99 bytes long. - To exit ScriptTool, select 'Exit ScriptTool' from Tools-menu. - Note that you can't quit Workbench, if you haven't exited from ScriptTool. Try it and you get 'Cannot Quit yet, open count = x" error message. Should any comments come to your mind, please write to: Jan Hagqvist Reinolankatu 5 A 1 48600 KARHULA FINLAND History V1.01 (Saturday, 13 February 1993) The first version I used. What happened to the V1.00, who knows? This is a perfectly working version of the program and needs V37 to run. Size = 1256 bytes V1.02 (Tuesday, 22 June 1993) A very minor update. I was browsing the Kernel Manual and noticed that V36 also has the workbench.library, so I made this program to work under V36 too. Now it needs the V36 to run. (If I keep browsing the manual I soon find that I can get it to work under 1.2 too, I guess). Size = 1256 bytes (Still)