From WikiChip
Difference between revisions of "mirc/commands/writeini"
< mirc‎ | commands

m (bot: correcting title)
(See also)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{mirc title|/writeini Command}}{{mIRC menu}}
+
{{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 19: Line 20:
  
 
== Synopsis ==
 
== Synopsis ==
  /writeini [-n] <inifile> <section> <item> <value>
+
  /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 54: Line 56:
 
* [[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|$readini}}
 
* {{mIRC|$ini}}
 
* {{mIRC|$ini}}
* {{mIRC|$read}}
 
 
* {{mIRC|$mircini}}
 
* {{mIRC|$mircini}}
* {{mIRC|$mircdir}}
 
* {{mIRC|/write}}
 
 
{{mIRC command list}}
 
{{mIRC command list}}
  
 
[[Category:mIRC commands|writeini command - mIRC]]
 
[[Category:mIRC commands|writeini command - mIRC]]

Latest revision as of 20:32, 7 June 2024

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]

v · d · e mIRC commands list

A /abook, /action, /add, /ajinvite, /alias, /aline, /ame, /amsg, /anick, /aop, /auser, /auto, /autojoin, /avoice, /away

B /background, /ban, /bcopy, /beep, /bindip, /bread, /break, /breplace, /bset, /btrunc, /bunset, /bwrite

C /channel, /clear, /clearall, /clearial, /cline, /clipboard, /close, /closechats, /closedccs, /closefserves, /closemsg, /cnick, /color, /colour, /comclose, /comlist, /commands, /comopen, /comreg, /continue, /copy, /creq, /ctcp, /ctcpreply, /ctcps

D /dcc, /dccserver, /dde, /ddeserver, /debug, /dec, /describe, /dialog, /did, /didtok, /disable, /disconnect, /dlevel, /dline, /dll, Template:mIRC/donotdisturb, /dns, /dqwindow, /drawcopy, /drawdot, /drawfill, /drawline, /drawpic, /drawrect, /drawreplace, /drawrot, /drawsave, /drawscroll, /drawsize /drawtext

E /ebeeps, /echo, /editbox, /else, /elseif, /emailaddr, /enable, /events, /exit

F /fclose, /filter, /findtext, /finger, /firewall, /flash, /flist, /flood, /flush, /flushini, /fnord, /font, /fopen, /fseek, /fsend, /fserve, /fullname, /fupdate, /fwrite

G /ghide, /gload, /gmove, /gopts, /goto, /gplay, /gpoint, /gqreq, /groups, /gshow, /gsize, /gstop, /gtalk, /gunload, /guser

H /hadd, /halt, /haltdef, /hdec, /hdel, /help, /hfree, /hinc, /hload, /hmake, /hotlink, /hop, /hsave

I /ial, /ialclear, /ialmark, /identd, /if, /ignore, /iline, /inc, /iuser

J /join

L /leave, /linesep, /links, /list, /load, /loadbuf, /localinfo, /log, /logview

M /maxdepth, /mdi, /me, /menubar, /mkdir, /mnick, /mode, /msg

N /noop, /notice, /notify

O /onotice, /omsg

P /pareline, /part, /partall, /pdcc, /perform, /play, /playctrl, /pop, /protect, /proxy, /pvoice

Q /qme, /qmsg, /query, /queryrn, /quit, /quote

R /raw, /registration, /reload, /remini, /remote, /remove, /rename, /renwin, /reseterror, /resetidle, /return, /returnex, /rlevel, /rline, /rmdir, /run, /ruser

S /save, /savebuf, /saveini, /say, /scid, /scon, /server, /set, /setlayer, /showmirc, /signal, /sline, /sockaccept, /sockclose, /socklist, /socklisten, /sockmark, /sockopen, /sockpause, /sockread, /sockrename, /sockudp, /sockwrite, /sound, /speak, /splay, /sreq, /strip, /switchbar

T /timer, /timestamp, /tip, /tips, /titlebar, /tnick, /tokenize, /toolbar, /topic /tray, /treebar

U /ulist, /unload, /unset, /unsetall, /updatenl, /url, /username, /uwho

V /var, /vcadd, /vcmd, /vcrem, /vol

W

X /xyzzy