home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
ifu98148.zip
/
INIWRITE.INF
(
.txt
)
< prev
Wrap
OS/2 Help File
|
1998-05-28
|
5KB
|
126 lines
ΓòÉΓòÉΓòÉ 1. INIWRITE Command Line ΓòÉΓòÉΓòÉ
INTRODUCTION
This program allows you to build or update OS/2 INI files from a text file.
This allows you to comment the INI contents and manage them under source
control programs such as PVCS and use programs such as PMDIFF to compare two
versions.
This program will make use of my "FASTINI.DLL" DLL (available from my web
page). If not found INI access will be very much slower (unless accessing the
USER or SYSTEM INI files).
INIWRITE Command Line
This command is used to modify an OS/2 or application ini file. You can specify
a single change from the command line or multiple changes in a changes file
(one change per line).
Syntax
[whitespace]INIWRITE [whitespace]ChangeFileName|"OneChange"[whitespace]
You should specify one of the following:
1. The "ChangeFileName" specifies the changes which should take place
and which INI files is being modified. It lists one or more INI file
changes (one per line).
2. The "OneChange" parameter is a single change (as a single change
would normally appear in a change file) surrounded by double quotes.
Updates
Please see my web page "http://www.ozemail.com.au/~dbareis". for the latest
copy of this program or contact me (Dennis Bareis) via email (db0@anz.com).
I'm open to any reasonable suggestions.
ΓòÉΓòÉΓòÉ 2. INIWRITE Data File ΓòÉΓòÉΓòÉ
INIWRITE Data File
This file is typically used where more than one change INI change is required
(since if only one were required it could have been specified on the INIWRITE
Command Line.
Blank line or lines that begin with ";" are ignored.
You may modify any number of INI files from within a single description file.
Note that my INIDUMP.CMD program can dump an INI file into this format.
Example
;--- Command to run ---
INIWRITE.CMD @MAXWIN.IU
;--- MAXWIN.IU contents ---
USER Shield ~Font{Space}Size... '06 0a'x
USER Shield fMaximize '0100'x
user Shield sInitialShape "DELETE:"
ΓòÉΓòÉΓòÉ 3. INIWRITE Update Commands ΓòÉΓòÉΓòÉ
Set An INI File Value
To set the value of an INI:
[whitespace]IniFileToChange[whitespace]ApplicationName[whitespace]KeyName[whitespace]NewValue[whitespace]
Note that my INIDUMP.CMD program can dump an INI file into this format.
The 1st (IniFileToChange) parameter on all change lines is the name of the INI
file being updated and may be one of the following values:
1. USER
The changes are to go into the OS/2 user INI file (OS2.INI)
2. SYSTEM
The changes are to go into the OS/2 system INI file (OS2SYS.INI)
3. A File Name
The changes are to go into the specified INI file.
The "ApplicationName" & "KeyName" values represent the INI value being
modified.
All parameters apart from "NewValue" go through a conversion process where the
following strings will be substituted:
{Space}
This is converted into a single space.
The "NewValue" value is any valid rexx expression which evaluates (you can
call string or conversion functions etc) to a string, the following are some
examples:
1. "A number of characters"
2. "A null terminated string" || "00"x
3. "A null terminated string with " || "00"x || "imbedded null!" ||
"00"x
4. "06 0a"x
5. GetEnv('PATH')
6. "A String" || d2c(0)
INI DELETION
You can delete either a single "Key" or an "Application" (therefore many
keys), to delete a single key:
[whitespace]IniFileToChange[whitespace]ApplicationName[whitespace]KeyName[whitespace]DELETE:
To delete a whole application:
[whitespace]IniFileToChange[whitespace]ApplicationName[whitespace]DELETE:
Example
You should look at the example data file commands for a real example which
could be used in production to set up the font size of windowed command
prompts (at least in OS/2 Warp version 3.0).