home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / wpstools.lzh / WPOBJ.DOC < prev   
Text File  |  1992-03-14  |  9KB  |  188 lines

  1. OS/2 2.0 Workplace Shell Tools (tested with 6.304)
  2. by Ned Konz
  3. BIX: nkonz, CI$ 76046,223
  4. March 15, 1992
  5.  
  6. ================ BACKGROUND
  7.  
  8. These programs are quick hacks which will let you play around with the WPS
  9. object creation. Note that you can get yourself into trouble with these;
  10. the system will let you make duplicate clocks, etc. which may be hard to
  11. get rid of, and I can't take any responsibility for your use of them.
  12. As with any program, you should read the source code before you use them
  13. if you're concerned about what they do.
  14.  
  15. ================ GETTING YOUR CLOCK BACK
  16.  
  17. To get your clock back into the System Setup folder, use MAKEOBJ like this:
  18.  
  19.     MAKEOBJ WPClock "System Clock" "<WP_CONFIG>"
  20.  
  21. This will create a new clock in the System Setup folder, just like the
  22. original one.
  23.  
  24. Don't run this more than once, or you'll end up with too many clocks
  25. (see next section). These can be hard to get rid of and can confuse the
  26. system, which expects to have only one.
  27.  
  28. ================ GETTING RID OF PESKY EXTRA CLOCKS
  29.  
  30. I wrote these programs to experiment with the WPS object functions,
  31. and to get my System Clock back. I promptly made too many clocks and
  32. had to go through the following to get rid of them:
  33.  
  34. (from command prompt)
  35.     mkdir c:\xyz
  36.  
  37. (go to WP Shell, then:)
  38.     open new folder c:\xyz from Drives
  39.     move extra clocks into this folder
  40.     close the folder
  41.  
  42. (from command prompt)
  43.     rmdir c:\xyz
  44.  
  45. =============== THE PROGRAMS
  46.  
  47. There are four executable files here:
  48.  
  49. ============== MAKEOBJ.EXE
  50.  
  51.       usage:    MAKEOBJ Classname Title Location [SetupString]
  52.  
  53. This creates a new Workplace Shell object (even new folders).
  54. See below for Classname, Location, and (optional) SetupString arguments.
  55.  
  56. Examples:
  57. To make a new system clock in the system startup folder:
  58.  
  59.     MAKEOBJ WPClock "System Clock" "<WP_CONFIG>"
  60.  
  61. To make a template of a folder and put it on the desktop, using the icon
  62. which resides in c:\icons\xyz.ico
  63.     
  64.     MAKEOBJ WPFolder "My New Folder" "<WP_DESKTOP>" "TEMPLATE=YES,ICON=c:\icons\xyz.ico"
  65.  
  66. ============== MODOBJ.EXE
  67.  
  68.       usage:    MODOBJ ObjID setupstring
  69.  
  70. This modifies the attributes of an existing object if it can find it.
  71.  
  72. ObjID is either an absolute path name or "<WP_xxx>" type location name.
  73. Probably others would work too, but I don't know their syntax.
  74.  
  75. for SetupString, see below.
  76.  
  77. ============= DESTOBJ.EXE
  78.  
  79.       usage:    DESTOBJ ObjID
  80.  
  81. This destroys an object if it can find it. See MODOBJ for OBJID.
  82. Obviously, you can delete things which may be hard to put back. Be careful.
  83.  
  84. ============= ENUMAPP.EXE
  85.  
  86.       usage:    ENUMAPP
  87.  
  88. This lists the application/key pairs from both OS2.INI and OS2SYS.INI.
  89. The abstract objects (those without pathnames) live in the INI files;
  90. you might be able to learn something from their contents.
  91.  
  92. =============== WPS LOCATIONS
  93. ===============================================================================
  94. Some locations I've found (see \OS2\INI.RC for more)
  95. Physical                    Name                            Location ID     Type
  96. (on FAT system)
  97. ===============================================================================
  98. \Nowhere                    Nowhere                         <WP_NOWHERE>    WPFolder
  99. \Desktop                    Desktop                         <WP_DESKTOP>    WPDesktop
  100. \Desktop\Template           Desktop->Templates              <WP_TEMPS>      WPTemplates
  101. \Desktop\Minimize           Desktop->Minimized Window Viewer  <WP_VIEWER>   WPMinWinViewer
  102. \Desktop\OS!2_Sys           Desktop->OS/2 System            <WP_OS2SYS>     WPFolder
  103. \Desktop\OS!2_Sys\Drives    Desktop->OS/2 System->Drives    <WP_DRIVES>     WPDrives
  104. \Desktop\OS!2_Sys\Startup   ... Startup                     <WP_START>      WPStartup
  105. \Desktop\OS!2_Sys\System_S  ... System Setup                <WP_CONFIG>     WPFolder
  106.  
  107. other locations I found on my system (using enumapp.exe):
  108.  
  109. <WP_NOWHERE>     <WP_DESKTOP>     <WP_TEMPS>     <WP_VIEWER>    
  110. <WP_SHRED>     <WP_MINDEX>     <WP_INFO>     <WP_NETWORK>     <WP_STHR>    
  111. <WP_GLOSS>     <WP_TUTOR>     <WP_CMDREF>     <WP_REXREF>     <WP_OS2SYS>    
  112. <WP_DRIVES>     <WP_START>     <WP_CONFIG>     <WP_CLOCK>     <WP_KEYB>    
  113. <WP_INST>     <WP_MOUSE>     <WP_DDINST>     <WP_MIGAPP>     <WP_SOUND>    
  114. <WP_SYSTEM>     <WP_CNTRY>     <WP_FNTPAL>     <WP_CLRPAL>     <WP_SCHPAL>    
  115. <WP_SPOOL>     <WP_PROMPTS>     <WP_OS2FS>     <WP_OS2WIN>     <WP_DOSFS>    
  116. <WP_DOSWIN>     <WP_WINFS>     <WP_GAMES>     <WP_KLDK>     <WP_RVRSI>    
  117. <WP_SCRBL>     <WP_NEKO>     <WP_JIGSAW>     <WP_CHESS>     <WP_TOOLS>    
  118. <WP_EPM>     <WP_SEEK>     <WP_ICON>     <WP_TERM>     <WP_PULSE>    
  119. <WP_CHART>     <WP_DCALC>     <WP_DNOTE>     <WP_DALARM>     <WP_DCALEM>    
  120. <WP_DDARC>     <WP_DDIARY>     <WP_DLIST>     <WP_DMNTH>     <WP_DTARC>    
  121. <WP_TODO>     <WP_TUNE>     <WP_SPREAD>     <WP_STICKY>     <WP_DBASE>    
  122. <WP_CLIPV>     <WP_PMDDE>     <WP_PICV>     <WP_SYSED>    
  123.  
  124. ============ SETUP STRINGS
  125.  
  126. The setup string is a series of keyword=value pairs, separated by commas.
  127. For instance, if I wanted to make a template for a Folder using the icon
  128. in the file "c:\icons\folder.ico", I would use the setup string:
  129.  
  130.     "TEMPLATE=YES,ICON=c:\icons\folder.ico,TITLE=My New Folder"
  131. ==============================================================================
  132. These are the keyname-value pairs supported by the WPObject class: 
  133.  
  134. ┌──────────┬──────────┬────────────────────────────────────────┐
  135. │KEYNAME   │VALUE     │Description                             │
  136. ├──────────┼──────────┼────────────────────────────────────────┤
  137. │TITLE     │Title     │This sets the object's title. This is   │
  138. │          │          │equivalent to calling the wpSetTitle    │
  139. │          │          │method.                                 │
  140. ├──────────┼──────────┼────────────────────────────────────────┤
  141. │ICON      │filename  │This sets the object's icon. This is    │
  142. │          │          │equivalent to calling the wpSetIconData │
  143. │          │          │method.                                 │
  144. ├──────────┼──────────┼────────────────────────────────────────┤
  145. │HELPPANEL │id        │This sets the object's default help     │
  146. │          │          │panel. This is equivalent to calling the│
  147. │          │          │wpSetDefaultHelp method.                │
  148. ├──────────┼──────────┼────────────────────────────────────────┤
  149. │TEMPLATE  │YES       │This sets the object's template         │
  150. │          │          │property. This is equivalent to calling │
  151. │          │          │the wpSetStyle method with a style of   │
  152. │          │          │OBJSTYLE_TEMPLATE.                      │
  153. ├──────────┼──────────┼────────────────────────────────────────┤
  154. │          │NO        │This resets the object's template       │
  155. │          │          │property.                               │
  156. ├──────────┼──────────┼────────────────────────────────────────┤
  157. │NODELETE  │YES       │This sets the object's no delete        │
  158. │          │          │property. This is equivalent to calling │
  159. │          │          │the wpSetStyle method with a style of   │
  160. │          │          │OBJSTYLE_NODELETE.                      │
  161. ├──────────┼──────────┼────────────────────────────────────────┤
  162. │          │NO        │This resets the object's no delete      │
  163. │          │          │property.                               │
  164. ├──────────┼──────────┼────────────────────────────────────────┤
  165. │NOCOPY    │YES       │This sets the object's no copy property.│
  166. │          │          │This is equivalent to calling the       │
  167. │          │          │wpSetStyle method with a style of       │
  168. │          │          │OBJSTYLE_NOCOPY.                        │
  169. ├──────────┼──────────┼────────────────────────────────────────┤
  170. │          │NO        │This resets the object's no copy style. │
  171. ├──────────┼──────────┼────────────────────────────────────────┤
  172. │NOMOVE    │YES       │This sets the object's no move property.│
  173. │          │          │This is equivalent to calling the       │
  174. │          │          │wpSetStyle method with a style of       │
  175. │          │          │OBJSTYLE_NOMOVE.                        │
  176. ├──────────┼──────────┼────────────────────────────────────────┤
  177. │          │NO        │This resets the object's no move        │
  178. │          │          │property.                               │
  179. ├──────────┼──────────┼────────────────────────────────────────┤
  180. │NOLINK    │YES       │This sets the object's no link property.│
  181. │          │          │This is equivalent to calling the       │
  182. │          │          │wpSetStyle method with a style of       │
  183. │          │          │OBJSTYLE_NOLINK.                        │
  184. ├──────────┼──────────┼────────────────────────────────────────┤
  185. │          │NO        │This resets the object's no link        │
  186. │          │          │property.                               │
  187. └──────────┴──────────┴────────────────────────────────────────┘
  188.