From WikiChip
Difference between revisions of "mirc/commands/writeini"
m (Bot: Automated text replacement (-<small>Note: Individual switches were not taken into consideration.</small> +)) |
m (Bot: Automated text replacement (-Added On:.+\n?\n?\n?\n?\n? +)) |
||
Line 49: | Line 49: | ||
== Compatibility == | == Compatibility == | ||
Added: mIRC v4.5 | Added: mIRC v4.5 | ||
− | |||
− | |||
− | |||
− | |||
− | |||
== See also == | == See also == |
Revision as of 23:37, 5 July 2014
The /writeini command is used to write and update a standard initialization file.
The Standard INI file has the following format:
[Section]
Item=value
Item2=value
;some comment
[Section2]
Item=value
Item2=value
Note:
For mIRC <= 6.35: Writing to a file bigger than 64KB requires the -n switch, otherwise an error will be generated, halting the script. (This is a limitation of the standard Win32 API GetPrivateProfileString() and WritePrivateProfileString())
For mIRC >= 7.00: mIRC now uses its own custom INI routine, the -n switch is obsolete.
Synopsis
/writeini [-n] <inifile> <section> <item> <value>
Switches
- -n - Forces mIRC to write to an INI file, even if it's bigger then 64k (see note above)
Parameters
- <inifile> - The filename to write to
- <section> - Section name
- <item> - Item name
- <value> - The data to store for the item
Example
;Write a few items to a file /writeini abb.ini abbreviations lol Laughing Out Loud /writeini abb.ini abbreviations rofl Rolling On the Floor, Laughing /* abb.ini format: [abbreviations] lol=Laughing Out Loud rofl=Rolling On the Floor, Laughing */ ;Retrieve 'lol' //echo -a $readini(abb.ini, n, abbreviations, lol) ;Prints out: Laughing Out Loud
Compatibility
Added: mIRC v4.5
See also
mIRC commands list