home *** CD-ROM | disk | FTP | other *** search
- Documentation for AddIcon Version 1.1
- by Timothy F. Sipples (Internet: sip1@ellis.uchicago.edu)
- July 11, 1992
-
- Modified by Michael J. Strasser (Internet: M.Strasser@edn.gu.edu.au)
- July 27, 1992
-
- Copyright 1992 by Timothy F. Sipples
-
- This utility may be freely distributed with all included files.
- For-profit (commercial) users, in lieu of a license fee, are asked to
- donate US $1.00 (or equivalent in local currency) per copy of AddIcon
- installed to a favorite, nonprofit charity.
-
- The following three files are included in this ADDICON package:
-
- ADDICON.DOC The file you are reading right now.
- ADDICON.CMD The AddIcon REXX program itself.
- ADDICON.ICO An icon for ADDICON.CMD (see below).
-
- AddIcon is written in REXX and runs under IBM OS/2 Version 2.0 or later.
- This release of OS/2 incorporates a highly graphical environment called
- the Workplace Shell.
-
- Using the drive objects, users are permitted to manipulate the files
- on the system. Each file can be represented by an icon. With Windows
- and OS/2 program files, and some data files, a pre-built icon is
- available so that Icon View displays colorful, useful icons.
-
- However, with many other program and data files, OS/2 uses a default,
- colorless icon. (For an example, open an Icon View for the root
- directory in which OS/2 is installed. The OS/2 README file will display
- with an icon that is not much more than a rectangle.)
-
- To easily distinguish between files it is often useful to attach an icon.
- OS/2 provides a method of doing so from the Workplace Shell. (From
- any open directory window from any drive object, select the file for
- which you wish to change the icon, click on it with mouse button two,
- then select Open -> Settings. Click on the General tab, then use the
- provided controls to change the icon.) However, this method is not
- helpful when one wishes to attach icons to large numbers of files at
- once. Also, some users prefer a command line method.
-
- AddIcon can attach icons from the command line using a simple REXX
- function. The icon file (ending in .ICO) must be in OS/2 format.
- It can be created by the OS/2 Icon Editor (that ships with OS/2 2.0),
- supplied by a software vendor, or even downloaded from a BBS or
- online service. [Icons created for Microsoft Windows 3.x can be
- converted to OS/2 format using the CVTICO utility, available from many
- OS/2 BBSes and online services. (CVTICO is not supplied here.) Or
- see below for another method.]
-
- To run AddIcon, open an OS/2 command line session (either full screen
- or windowed). At the command line prompt, type:
-
- x:\path\ADDICON x:\path\iconfile x:\path\filename
-
- where "x" is the appropriate drive letter (optional, as required);
- "path" is the appropriate path (optional, as required);
- iconfile is the name of the icon file (e.g. DOC.ICO);
- filename is the name of the file to which the icon is to be
- attached (e.g. TEST.TXT).
-
- Examples:
-
- ADDICON C:\ICONS\DOC.ICO TEST.TXT
-
- Attaches the icon DOC.ICO, located in C:\ICONS, to the file TEST.TXT,
- located on the current drive in the current directory.
-
- ADDICON GRAPH.ICO \DATA\YEAREND\NUMBERS.WK3
-
- Attaches the icon GRAPH.ICO, located on the current drive in the
- current directory, to the file NUMBERS.WK3, located on the current
- drive in the directory \DATA\YEAREND.
-
- When ADDICON is run without any arguments, a help screen is displayed.
-
- AddIcon places the icon data in the file's extended attributes. On FAT
- partitions these extended attributes are located in the file EA DATA. SF
- (in the root directory). On HPFS partitions these extended attributes
- are stored contiguously with the file.
-
- File operations which do not preserve extended attributes will destroy
- the icon data, and the icon will have to be reattached. For example,
- when running under native DOS (without OS/2 running), COPYing a file
- with extended attributes will not COPY the extended attributes along
- with it.
-
- Icon data may be removed from a file (under OS/2) by removing the
- extended attributes (and storing them in a separate file). To do so,
- use the EAUTIL program (see the online Command Reference for information
- on this utility). Note that an icon is not necessarily the only thing
- stored in extended attributes, and sometimes a program (or even OS/2
- itself) depends on other, specific extended attribute data, so use
- EAUTIL with caution. You may wish to merely change the existing icon
- by using AddIcon again rather than deleting all extended attributes
- for the file.
-
- IMPORTANT: Using AddIcon to attach an icon to a file may not result
- in an immediate change in the appearance of the file when viewed
- through the drive objects. A Shutdown and reboot may be necessary
- for the change to appear.
-
- AddIcon supports wildcards and multiple filespecs. Each is processed
- in turn. Only one icon file can be attached in each call of AddIcon.
-
- If you do not wish to create icon files by hand (using OS/2's Icon
- Editor), you may extract any icon used as the default program icon
- for any Windows or OS/2 Presentation Manager program. To do so, first
- open the Templates folder and drag (using mouse button two) a
- Program template from the folder to any convenient folder (or to
- the desktop). A notebook settings dialog window should open
- automatically. In the program name box, type the full pathname to
- the program (for example, C:\LOTUS\123G.EXE). Then click on the
- General tab. If the icon you wish to save to an icon file displays
- correctly, click on the Edit button. If not, go back to the first
- page and correct the program name.
-
- When you click on the Edit button the Icon Editor should start and
- display the program icon. Select File -> Save As. Save the icon
- to a file (e.g. C:\ICONS\LOTUS.ICO). Make sure you select OS/2 2.0
- format when you save the file. Then, close the Icon Editor. Close
- the notebook settings dialog window. Then drag the program object
- to the Shredder (unless you wish to keep it for some reason).
-
- Bear in mind that icons do take up some disk space, so use some
- judgment. Note that OS/2 2.0 CSD Level 02000 (use the command
- SYSLEVEL from the OS/2 command line to determine the CSD level)
- contains a bug which prevents proper display, using the drive
- objects, of any directory with a large number of icons (in the
- hundreds). To avoid this problem you should place no more than about
- 200 icon files in any one directory.
-
- CSD Level 02000 also contains some problems with the REXX interpreter.
- You may wish to obtain the freely available REXX patches available
- from IBM (through BBSes and online services).
-
- This package contains a VGA resolution icon in OS/2 2.0 format for
- AddIcon itself. Assuming all the files in the AddIcon package are
- located on the current drive in the current directory you may attach
- this icon to ADDICON.CMD by typing the following commands at the
- OS/2 command line:
-
- COPY ADDICON.CMD ADDICON.TMP
- ADDICON ADDICON.ICO ADDICON.TMP
- DEL ADDICON.CMD
- RENAME ADDICON.TMP ADDICON.CMD
-
- AddIcon could conceivably be used as a program object on the Workplace
- Shell desktop (so that, for example, dragging a file to the AddIcon
- program object would attach a certain icon). Also, AddIcon could be
- used to automatically attach icons to data files as part of running
- an application. Using a batch file to invoke the application, upon
- exit from the application AddIcon could be called to attach icons
- to all data files in a given directory, for example. The graphics
- cut and paste facility, and OS/2's Icon Editor, can be used to easily
- create icons from graphical DOS programs. I leave it up to the reader
- to try these approaches.
-
- I welcome your comments on suggestions on how to improve AddIcon.
- Please write to me through the Internet address given at the top
- of this file or, if you prefer, you may write to:
-
- Timothy F. Sipples
- Dept. of Economics
- University of Chicago
- Chicago, IL 60637
-
- I cannot guarantee a response to your questions, comments, and
- suggestions, but I would appreciate them.
-
- T.F.S.
-