home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / ADDICO11.ZIP / ADDICON.DOC < prev    next >
Text File  |  1992-07-27  |  8KB  |  174 lines

  1. Documentation for AddIcon Version 1.1
  2. by Timothy F. Sipples (Internet: sip1@ellis.uchicago.edu)
  3. July 11, 1992
  4.  
  5. Modified by Michael J. Strasser (Internet: M.Strasser@edn.gu.edu.au)
  6. July 27, 1992
  7.  
  8. Copyright 1992 by Timothy F. Sipples
  9.  
  10. This utility may be freely distributed with all included files.
  11. For-profit (commercial) users, in lieu of a license fee, are asked to
  12. donate US $1.00 (or equivalent in local currency) per copy of AddIcon
  13. installed to a favorite, nonprofit charity.
  14.  
  15. The following three files are included in this ADDICON package:
  16.  
  17. ADDICON.DOC    The file you are reading right now.
  18. ADDICON.CMD    The AddIcon REXX program itself.
  19. ADDICON.ICO    An icon for ADDICON.CMD (see below).
  20.  
  21. AddIcon is written in REXX and runs under IBM OS/2 Version 2.0 or later.
  22. This release of OS/2 incorporates a highly graphical environment called
  23. the Workplace Shell.
  24.  
  25. Using the drive objects, users are permitted to manipulate the files
  26. on the system.  Each file can be represented by an icon.  With Windows
  27. and OS/2 program files, and some data files, a pre-built icon is
  28. available so that Icon View displays colorful, useful icons.
  29.  
  30. However, with many other program and data files, OS/2 uses a default,
  31. colorless icon.  (For an example, open an Icon View for the root
  32. directory in which OS/2 is installed.  The OS/2 README file will display
  33. with an icon that is not much more than a rectangle.)
  34.  
  35. To easily distinguish between files it is often useful to attach an icon.
  36. OS/2 provides a method of doing so from the Workplace Shell.  (From
  37. any open directory window from any drive object, select the file for
  38. which you wish to change the icon, click on it with mouse button two,
  39. then select Open -> Settings.  Click on the General tab, then use the
  40. provided controls to change the icon.)  However, this method is not
  41. helpful when one wishes to attach icons to large numbers of files at
  42. once.  Also, some users prefer a command line method.
  43.  
  44. AddIcon can attach icons from the command line using a simple REXX
  45. function.  The icon file (ending in .ICO) must be in OS/2 format.
  46. It can be created by the OS/2 Icon Editor (that ships with OS/2 2.0),
  47. supplied by a software vendor, or even downloaded from a BBS or
  48. online service.  [Icons created for Microsoft Windows 3.x can be
  49. converted to OS/2 format using the CVTICO utility, available from many
  50. OS/2 BBSes and online services.  (CVTICO is not supplied here.)  Or
  51. see below for another method.]
  52.  
  53. To run AddIcon, open an OS/2 command line session (either full screen
  54. or windowed).  At the command line prompt, type:
  55.  
  56. x:\path\ADDICON x:\path\iconfile x:\path\filename
  57.  
  58. where "x" is the appropriate drive letter (optional, as required);
  59.       "path" is the appropriate path (optional, as required);
  60.       iconfile is the name of the icon file (e.g. DOC.ICO);
  61.       filename is the name of the file to which the icon is to be
  62.            attached (e.g. TEST.TXT).
  63.  
  64. Examples:
  65.  
  66. ADDICON C:\ICONS\DOC.ICO TEST.TXT
  67.  
  68. Attaches the icon DOC.ICO, located in C:\ICONS, to the file TEST.TXT,
  69. located on the current drive in the current directory.
  70.  
  71. ADDICON GRAPH.ICO \DATA\YEAREND\NUMBERS.WK3
  72.  
  73. Attaches the icon GRAPH.ICO, located on the current drive in the
  74. current directory, to the file NUMBERS.WK3, located on the current
  75. drive in the directory \DATA\YEAREND.
  76.  
  77. When ADDICON is run without any arguments, a help screen is displayed.
  78.  
  79. AddIcon places the icon data in the file's extended attributes.  On FAT
  80. partitions these extended attributes are located in the file EA DATA. SF
  81. (in the root directory).  On HPFS partitions these extended attributes
  82. are stored contiguously with the file.
  83.  
  84. File operations which do not preserve extended attributes will destroy
  85. the icon data, and the icon will have to be reattached.  For example,
  86. when running under native DOS (without OS/2 running), COPYing a file
  87. with extended attributes will not COPY the extended attributes along
  88. with it.
  89.  
  90. Icon data may be removed from a file (under OS/2) by removing the
  91. extended attributes (and storing them in a separate file).  To do so,
  92. use the EAUTIL program (see the online Command Reference for information
  93. on this utility).  Note that an icon is not necessarily the only thing
  94. stored in extended attributes, and sometimes a program (or even OS/2
  95. itself) depends on other, specific extended attribute data, so use
  96. EAUTIL with caution.  You may wish to merely change the existing icon
  97. by using AddIcon again rather than deleting all extended attributes
  98. for the file.
  99.  
  100. IMPORTANT:  Using AddIcon to attach an icon to a file may not result
  101. in an immediate change in the appearance of the file when viewed
  102. through the drive objects.  A Shutdown and reboot may be necessary
  103. for the change to appear.
  104.  
  105. AddIcon supports wildcards and multiple filespecs.  Each is processed
  106. in turn.  Only one icon file can be attached in each call of AddIcon.
  107.  
  108. If you do not wish to create icon files by hand (using OS/2's Icon
  109. Editor), you may extract any icon used as the default program icon
  110. for any Windows or OS/2 Presentation Manager program.  To do so, first
  111. open the Templates folder and drag (using mouse button two) a
  112. Program template from the folder to any convenient folder (or to
  113. the desktop).  A notebook settings dialog window should open
  114. automatically.  In the program name box, type the full pathname to
  115. the program (for example, C:\LOTUS\123G.EXE).  Then click on the
  116. General tab.  If the icon you wish to save to an icon file displays
  117. correctly, click on the Edit button.  If not, go back to the first
  118. page and correct the program name.
  119.  
  120. When you click on the Edit button the Icon Editor should start and
  121. display the program icon.  Select File -> Save As.  Save the icon
  122. to a file (e.g. C:\ICONS\LOTUS.ICO).  Make sure you select OS/2 2.0
  123. format when you save the file.  Then, close the Icon Editor.  Close
  124. the notebook settings dialog window.  Then drag the program object
  125. to the Shredder (unless you wish to keep it for some reason).
  126.  
  127. Bear in mind that icons do take up some disk space, so use some
  128. judgment.  Note that OS/2 2.0 CSD Level 02000 (use the command
  129. SYSLEVEL from the OS/2 command line to determine the CSD level)
  130. contains a bug which prevents proper display, using the drive
  131. objects, of any directory with a large number of icons (in the
  132. hundreds).  To avoid this problem you should place no more than about
  133. 200 icon files in any one directory.
  134.  
  135. CSD Level 02000 also contains some problems with the REXX interpreter.
  136. You may wish to obtain the freely available REXX patches available
  137. from IBM (through BBSes and online services).
  138.  
  139. This package contains a VGA resolution icon in OS/2 2.0 format for
  140. AddIcon itself.  Assuming all the files in the AddIcon package are
  141. located on the current drive in the current directory you may attach
  142. this icon to ADDICON.CMD by typing the following commands at the
  143. OS/2 command line:
  144.  
  145. COPY ADDICON.CMD ADDICON.TMP
  146. ADDICON ADDICON.ICO ADDICON.TMP
  147. DEL ADDICON.CMD
  148. RENAME ADDICON.TMP ADDICON.CMD
  149.  
  150. AddIcon could conceivably be used as a program object on the Workplace
  151. Shell desktop (so that, for example, dragging a file to the AddIcon
  152. program object would attach a certain icon).  Also, AddIcon could be
  153. used to automatically attach icons to data files as part of running
  154. an application.  Using a batch file to invoke the application, upon
  155. exit from the application AddIcon could be called to attach icons
  156. to all data files in a given directory, for example.  The graphics
  157. cut and paste facility, and OS/2's Icon Editor, can be used to easily
  158. create icons from graphical DOS programs.  I leave it up to the reader
  159. to try these approaches.
  160.  
  161. I welcome your comments on suggestions on how to improve AddIcon.
  162. Please write to me through the Internet address given at the top
  163. of this file or, if you prefer, you may write to:
  164.  
  165. Timothy F. Sipples
  166. Dept. of Economics
  167. University of Chicago
  168. Chicago, IL  60637
  169.  
  170. I cannot guarantee a response to your questions, comments, and
  171. suggestions, but I would appreciate them.
  172.  
  173. T.F.S.
  174.