January 19, 1992 << IconToolsII >> by Richard Mazzarisi written in Jforth Professional 2.0 by Delta Research Introduction: These programs are two tools for managing icons under the Workbench. The package consists of four programs, namely FloatIcon, ReplaceTool, SwapColors and ReplaceImage. (FloatIcon and ReplaceImage are updates from the original set.) They have been done before, but I have never seen such tools that worked totally as an Workbench based operation or allowed you to manipulate many icons in one operation. So I decided to write them. They are self documenting; just double click the icon to see the instructions. These programs not public domain but are freely distributable as long as they are distributed with this notice and only a nominal fee is charged for the disks to cover the cost of distribution. They may be included in Fred Fish's collection and in Delta Research's JGoodies disks. NOTE: The author assumes no responsibility for any damages resulting from the use of these programs. ReplaceTool 2.04: ReplaceTool allows you to change the default tool of any number of project icons all at once. This is useful when installing a program and some projects created by it onto a disk which will have a different path from that of the distribution disk. Usually double clicking the project icon would result in a program not found error. Then you had to type the new path into each icon using "info" from the Workbench menu, one by one! Now instead you can just click on ReplaceTool and shift click on all the project icons and the tool to be used. That tool's path and name will be placed in the DefaultTool slot of the icon. And how about all those README files whose icons all have some text file browser in a subdirectory of the original disk as their default tool; less has no icon, you say. Well, there is a second way to use ReplaceTool. If you shift click ONLY on project icons, ReplaceTool will open the ARP file requester with which you can specify the tool and its path. The default directory will be SYS:, and of course you may click the buttons and names to get the path and tool you desire. Or you may type the path and name into the string requesters. You may type ANY path or name into the requesters regardless of what is shown in the window; so that a relative path is possible such as "/" to use a tool one directory up from where the project lives, ":" to indicate the current disk, or blank it out entirely to indicate the same directory. You just type the appropriate path into the drawer string requester AFTER getting the correct file name to show in the file string requester with the gadgets, or just type in both path and file names. (With Workbench 2.0's ASL file requester you may get a 'Directory Error' if the directory name doesn't directly relate to the directory shown in the window. This may be safely ignored; the string typed in will be the one used.) If you are using Workbench 1.3 or earlier and want to use the second option, you must have the arp.library (version 39 or greater) installed in your LIBS: directory. For Workbench 2.0 the ASL requester is used. FloatIcon 1.05: FloatIcon is a spinoff of Replacetool, basically it was practice at accessing the icon info and writing it back. It simply lets you make an icon free floating again after it has been "Snapshot". This means that the Workbench will decide where it should be placed when a drawer is opened rather than putting it at a fixed position. Having the icons free floating seems to work better with Dave Navas' JazzBench since it does a more intelligent job of icon placement than the Workbench, so that the names don't overlap. (AmigaDos 2.0 does a better job at this than 1.3) To use it just shift click on all the icons that you want to float after clicking first on SwapColors, double clicking on the last one. This program is here only for Workbench 1.3 users since 2.0 has a menu item to accomplish the same end. SwapColors 1.01 SwapColors is used to reverse the colors 1 and 2 in the icons. This is necessary for users of Workbench 2.0 to make icons which were used under 1.3 look better under the new version. Only four color icons are altered by SwapColors. If an icon has more than four colors it will be skipped over with a notification of that fact. If an icon has a separate image for the selected state, swapcolors will do the color swap on both images. This program is used in the same way as FloatIcon; just click on SwapColors followed by shift clicking on all the icons that you wish to change the colors on. ReplaceImage 1.01 ReplaceImage will change the image of a number of icons to be the same as the first one clicked. This can be used, for example, to transform all your 1.3 drawer icons into the 2.0 style. This program replaces only the gadget structure of an icon and will leave the DefaultTool and ToolTypes as they were. To use ReplaceImage you MUST shift click on the icon whose image you want to use right after clicking on ReplaceImage, then shift click on all the icons which are to receive this image, double clicking on the last one. JAZZBENCH USERS NOTE!! Jazzbench 0.8 passes arguments in reverse order from Workbench, so you MUST click on the icon whose image is to be used LAST! Compiling the programs: In order to recompile these programs you need the Jforth Professional 2.0 Amiga developement package from Delta research. Assign JARP: to the directory where the arp header file and support file may be found. The other standard assigns for JForth are assumed to be set. The asl_support file should be put into ju:. And you will need the following include files in ji: libraries/asl.j, utility/hooks.j and utility/tagitem.j:, and the asl_lib.fd file in the JForth:fd.files drawer. NOTE: Under Workbench 1.3 the changes effected by these programs do not take effect until the icons are reread from the disk. So it is necessary to close the drawers involved and to reopen them before using the modified icons. Under version 2.0 the changes take effect immediately. Richard Mazzarisi 891 Post St. #207 San Francisco, CA 94109 email: rich@californium.cchem.berkeley.edu rich@bloch.cchem.berkeley.edu rmazz@hydrogen.cchem.berkeley.edu