ToolAppIcon V3.1 1. Copyright and Disclaimer =========================== ToolAppIcon is FREEWARE. That is, you are allowed to redistribute and use this package as long as the following rules are maintained: a) You may only distribute the complete package, you must NOT modify, add or delete any files of the archive. You may only take a small fee for a copy of this package (less than $5 for a floppy disk containing this archive). b) This software may be freely distributed via electronic channels like InterNet/UseNet, BSSs; it may also be included in FD-distributions like the Aminet® CD-ROMs, Fred Fish's and AMOK disks. c) The copyright of this software remains at the author. If you want to use the code or parts of it for your own programs, please let my name in it. If you want to include the code or parts of it in a SHAREWARE or commercial program, you either have to send me a free registered version of it or get a written permission by the author. d) By using this software, you accept the FULL resonsibility for any loss of data or damage that might be caused directly or indirectly by this software. There is no guarantee of the usefulness or quality of the programs and the descriptions. Use this sofware on your own risk. e) If you accept these points, you may use this software freely. You may copy the whole archive or parts of it to your own hard disk(s) of floppy disk(s). Its' not necessary to have the complete contents of the archive on your hard disk(s) or floppy disk(s), as long as a) is maintained. Some names used in this description or files of this archive might be trademarks or registered trademarks. Using these names without note does not mean that they are free. 2. Author(s) ============ Dirk Harms Raiffeisenstr. 31 29568 Wieren Germany Icons "Anzeigen" and "Bearbeiten" created by Torsten Techmann. 3. Purpose ========== ToolAppIcon puts an appicon on your workbench. If you drag an icon of a file on the appicon then ToolAppIcon will scan the file for its datatype and call a program with the name of the file as argument. ToolAppIcon can only be started from workbench with an icon as argument containing the names of the programs that will be called in its tooltypes. 4. Requirements =============== ToolAppIcon V 3.1 needs the following libraries - datatypes.library - iffparse.library - ASL.library - and some libraries in ROM and thus should work fine with OS 3.0 or higher. Tested on A 4000/40 running OS 3.0, A 3000/30 running OS 3.1 and A 500 with a 68030 Turboboard running OS 3.1. 5. Compiler & History ===================== ToolAppIcon is written in Oberon 2 using the AmigaOberon compiler. Compile it without Garbage-Collector. V 2.0 supports ASL file requester. V 3.1 now starts a new process each time an icon is dragged on the appicon. Thus it's possible to start another program using the appicon while a previously started is still running. 6. Usage ======== First you should rename either ToolAppIcon31.g (german version) or ToolAppIcon31.e (english version) to ToolAppIcon, they are in the drawers bin_68000 or bin_68030. Then just copy ToolAppIcon to somewhere in your search path. If you intend to take advantage of the dvi.datatype contained in this package, just drag its icon to the DEVS:Datatypes drawer and reboot before using it. ToolAppIcon can only be started from workbench with an argument specifying an icon. The image of that icon will now appear on the workbench. ToolAppIcon will search in the tooltypes of this icon for its parameters. The following options are possible: a) An Entry Output= will set the standard output for the programs called by ToolAppIcon. If no such entry exists, ToolAppIcon will use the following window "CON:0/0/520/100/ToolAppIcon/Auto/Close" which will e.g. display error messages of the called programs. b) An Entry = will result in a call of that program each time an icon with that datatypeID is dropped on the appicon. The datatypeID consists of at most four characters specifying the datatype of the file e.g. asci for ASCII text files. c) An Entry Default= tells ToolAppIcon to call that default program, if the file dropped on the appicon has a datatypeID not listed in the tooltypes. The easiest way to start ToolAppIcon is thus to doubleclick on an project icon having tooltypes in the way described above and having "ToolAppIcon" as its default tool. When an icon of a file is dragged on the appicon, ToolAppIcon scans the file for its datatypeID. If a fitting entry exists, then the specified program will be called with the name of the file as argument. If no such entry exists, then ToolAppIcon will try the default tool as described under c). If no default tool is defined, then ToolAppIcon will show a requester showing the datatypeID of the file. If you drag the icon of a directory on the appicon, then ToolAppIcon will search for an entry dire= and use it as described above. If no such entry exists, then an ASL file requester will show up. As the programs called by ToolAppIcon are started using the Dos.execute function, you can use nearly all programs that can be started from the CLI. You can even use script-files, however you can't use the "run" command. To get rid of ToolAppIcon just doubleclick on the appicon. 7. Example ========== Have a look at the icon called "Anzeigen". It will use more for ASCII files, CyberView for JPEG pictures, ShowDVI for TeX's .dvi files and MultiView for all the rest. 8. Additional Remarks ===================== If you need more datatypes to distinguish different files, you might use the program called "dtdesc" that can be found on the Amiga Developer CD at Amiga_Dev_CD_v1.1:NDK3.1/Examples2/Datatypes/Bin/ . dtdesc will generate the scanner part of a datatype (the short files in DEVS:DataTypes/). The dvi.datatype was created that way. 9. Thanks To ============ Torsten Techmann for testing several versions, telling me how to get an output window only shown when necessary and finally creating the lovely icons "Anzeigen" and "Bearbeiten". Matthias Meisner for testing the final version.