-
Notifications
You must be signed in to change notification settings - Fork 28
dos_setini
Copies a string into the specified section of the Windows-style initialization (.INI) file. An initialization file must have the following form:
[section]
entry=string
...
(dos_setini section entry string filename)
section
The section to which the string will be copied. If section
does not exist, it is created.
entry
The name of the entry to be associated with string. If entry
does not exist in the specified section, it is created. If entry
is nil, the entire section, including all entries within the section, is deleted.
string
The string to be written to the file. If this parameter is nil, the entry pointed to by entry
is deleted.
filename
The name of the initialization file. If filename
does not exist, the function creates the file. The specified directory must already exist.
Note, parameters are not case sensitive, so section
and entry
may be in any combination of uppercase and lowercase characters. Also, to improve performance, Windows keeps a cached version of the most recently accessed initialization file. If filename
is specified and the other arguments are nil, Windows flushes the cache. This function always returns nil after flushing the cache, regardless of whether the flush succeeds or fails.
A qualified path name to filename if successful.
nil on error.
Command: (dos_setini "section1" "entry1" "string1" "filename.ini")
"C:\\Program Files\\AutoCAD 2006\\filename.ini"
Command: (dos_setini "section1" "entry2" "string2" "filename.ini")
"C:\\Program Files\\AutoCAD 2006\\filename.ini"
Command: (dos_setini "section2" "entry1" "string1" "filename.ini")
"C:\\Program Files\\AutoCAD 2006\\filename.ini"