home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / ifu98148.zip / INIWRITE.INF (.txt) < prev   
OS/2 Help File  |  1998-05-28  |  5KB  |  126 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. INIWRITE Command Line ΓòÉΓòÉΓòÉ
  3.  
  4. INTRODUCTION 
  5.  
  6. This program allows you to build or update OS/2 INI files from a text file. 
  7. This allows you to comment the INI contents and manage them under source 
  8. control programs such as PVCS and use programs such as PMDIFF to compare two 
  9. versions. 
  10.  
  11. This program will make use of my "FASTINI.DLL" DLL (available from my web 
  12. page).  If not found INI access will be very much slower (unless accessing the 
  13. USER or SYSTEM INI files). 
  14.  
  15. INIWRITE Command Line 
  16.  
  17. This command is used to modify an OS/2 or application ini file. You can specify 
  18. a single change from the command line or multiple changes in a changes file 
  19. (one change per line). 
  20.  
  21. Syntax 
  22.  
  23.         [whitespace]INIWRITE [whitespace]ChangeFileName|"OneChange"[whitespace]
  24.  
  25. You should specify one of the following: 
  26.  
  27.        1. The "ChangeFileName" specifies the changes which should take place 
  28.           and which INI files is being modified.  It lists one or more INI file 
  29.           changes (one per line). 
  30.  
  31.        2. The "OneChange" parameter is a single change (as a single change 
  32.           would normally appear in a change file)  surrounded by double quotes. 
  33.  
  34.  Updates 
  35.  
  36.  Please see my web page "http://www.ozemail.com.au/~dbareis". for the latest 
  37.  copy of this program or contact me (Dennis Bareis) via email (db0@anz.com). 
  38.  I'm open to any reasonable suggestions. 
  39.  
  40.  
  41. ΓòÉΓòÉΓòÉ 2. INIWRITE Data File ΓòÉΓòÉΓòÉ
  42.  
  43. INIWRITE Data File 
  44.  
  45. This file is typically used where more than one change INI change is required 
  46. (since if only one were required it could have been specified on the INIWRITE 
  47. Command Line. 
  48.  
  49. Blank line or lines that begin with ";" are ignored. 
  50.  
  51. You may modify any number of INI files from within a single description file. 
  52.  
  53. Note that my INIDUMP.CMD program can dump an INI file into this format. 
  54.  
  55. Example 
  56.  
  57.         ;--- Command to run ---
  58.         INIWRITE.CMD   @MAXWIN.IU
  59.  
  60.  
  61.         ;--- MAXWIN.IU contents ---
  62.         USER Shield  ~Font{Space}Size...     '06 0a'x
  63.         USER Shield  fMaximize               '0100'x
  64.         user Shield  sInitialShape           "DELETE:"
  65.  
  66.  
  67. ΓòÉΓòÉΓòÉ 3. INIWRITE Update Commands ΓòÉΓòÉΓòÉ
  68.  
  69. Set An INI File Value 
  70.  
  71. To set the value of an INI: 
  72.  
  73.  
  74.     [whitespace]IniFileToChange[whitespace]ApplicationName[whitespace]KeyName[whitespace]NewValue[whitespace]
  75.  
  76. Note that my INIDUMP.CMD program can dump an INI file into this format. 
  77.  
  78. The 1st (IniFileToChange) parameter on all change lines is the name of the INI 
  79. file being updated and may be one of the following values: 
  80.  
  81.        1. USER 
  82.           The changes are to go into the OS/2 user INI file (OS2.INI) 
  83.  
  84.        2. SYSTEM 
  85.           The changes are to go into the OS/2 system INI file (OS2SYS.INI) 
  86.  
  87.        3. A File Name 
  88.           The changes are to go into the specified INI file. 
  89.  
  90.  The "ApplicationName" & "KeyName" values represent the INI value being 
  91.  modified. 
  92.  
  93.  All parameters apart from "NewValue" go through a conversion process where the 
  94.  following strings will be substituted: 
  95.  
  96.          {Space} 
  97.           This is converted into a single space. 
  98.  
  99.  The "NewValue" value is any valid rexx expression which evaluates (you can 
  100.  call string or conversion functions etc) to a string, the following are some 
  101.  examples: 
  102.  
  103.        1. "A number of characters" 
  104.        2. "A null terminated string" || "00"x 
  105.        3. "A null terminated string with " || "00"x || "imbedded null!" || 
  106.           "00"x 
  107.        4. "06 0a"x 
  108.        5. GetEnv('PATH') 
  109.        6. "A String" || d2c(0) 
  110.  
  111.  INI DELETION 
  112.  
  113.  You can delete either a single "Key" or an "Application" (therefore many 
  114.  keys), to delete a single key: 
  115.  
  116.       [whitespace]IniFileToChange[whitespace]ApplicationName[whitespace]KeyName[whitespace]DELETE:
  117.  
  118.  To delete a whole application: 
  119.  
  120.       [whitespace]IniFileToChange[whitespace]ApplicationName[whitespace]DELETE:
  121.  
  122.  Example 
  123.  
  124.  You should look at the example data file commands for a real example which 
  125.  could be used in production to set up the font size of windowed command 
  126.  prompts (at least in OS/2 Warp version 3.0).