From WikiChip
Difference between revisions of "mirc/commands/writeini"
m (Bot: Fixing links) |
(→See also) |
||
(12 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{mirc title|/writeini Command}} | ||
The '''/writeini command''' is used to write and update a standard [[INI Files - mIRC|initialization file]]. | The '''/writeini command''' is used to write and update a standard [[INI Files - mIRC|initialization file]]. | ||
+ | == Overview == | ||
The Standard INI file has the following format: | The Standard INI file has the following format: | ||
Line 18: | Line 20: | ||
== Synopsis == | == Synopsis == | ||
− | /writeini [- | + | /writeini [-nz] <inifile> <section> <item> <value> |
== Switches == | == Switches == | ||
* '''-n''' - Forces mIRC to write to an INI file, even if it's bigger then 64k (see note above) | * '''-n''' - Forces mIRC to write to an INI file, even if it's bigger then 64k (see note above) | ||
+ | * '''-z''' - Write an empty value | ||
== Parameters == | == Parameters == | ||
Line 48: | Line 51: | ||
== Compatibility == | == Compatibility == | ||
− | + | {{mIRC compatibility|4.5}} | |
− | |||
− | |||
− | |||
− | |||
− | |||
== See also == | == See also == | ||
* [[List of commands - mIRC|List of commands]] | * [[List of commands - mIRC|List of commands]] | ||
* [[List of identifiers - mIRC|List of identifiers]] | * [[List of identifiers - mIRC|List of identifiers]] | ||
− | + | ||
− | * | + | * {{mIRC|/remini}} |
− | * | + | * {{mIRC|$readini}} |
− | * | + | * {{mIRC|$ini}} |
− | + | * {{mIRC|$mircini}} | |
− | * {{mIRC| | ||
{{mIRC command list}} | {{mIRC command list}} | ||
− | [[Category: | + | [[Category:mIRC commands|writeini command - mIRC]] |
Latest revision as of 20:32, 7 June 2024
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
The /writeini command is used to write and update a standard initialization file.
Overview[edit]
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[edit]
/writeini [-nz] <inifile> <section> <item> <value>
Switches[edit]
- -n - Forces mIRC to write to an INI file, even if it's bigger then 64k (see note above)
- -z - Write an empty value
Parameters[edit]
- <inifile> - The filename to write to
- <section> - Section name
- <item> - Item name
- <value> - The data to store for the item
Example[edit]
;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[edit]
Added: mIRC v4.5
Added on: 30 Jun 1996
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.
See also[edit]
mIRC commands list