mIRC Homepage
Posted By: Cheech /writeini and /saveini - 26/12/03 07:54 AM
when using /writeini how do you update the ini file for a test on this i wrote to the mirc.ini file
.
writeini -n mirc.ini Text aptitle Testing
then i used saveini to save it but the text does not change in the titlebar ? is this an error or does the command not work that way ?
Posted By: Hitchhiker Re: /writeini and /saveini - 26/12/03 08:08 AM
mIRC uses mirc.ini to store setting when mirc is closed, so it writes to mirc.ini when you close mirc, and anything you have changed by hand when mirc is open will be lost.

from help file under /help /writeini :
Warning: Do not use this command to modify any of the INI files currently being used by mIRC.


Posted By: Cheech Re: /writeini and /saveini - 26/12/03 07:18 PM
well i read all that before i fooled around but what i am not grasping is whts the purpose then if i go to mirc options / display / options . i can change the text in the titlebar and have it take effect and save right away ? so why can i not accomplish this with /writeini and /saveini ?

thanks .
Posted By: Cheech Re: /writeini and /saveini - 27/12/03 02:07 AM
anybody can explain this ?
Posted By: KingTomato Re: /writeini and /saveini - 27/12/03 02:15 AM
INI's are someone stored in cache (ram, temporary memory, whatever you're farmiliar with). As a result, when you use a command like /readini, you may infact be pulling a value from ram, not from the file itself. /saveini and /loadini alike turn virtual memory into file storage, and vise versa.

As with your question before, mirc does use ini's as part of the 'cleanup' process, not during runtime. But scripts you write do read ini's at run time, thus making the usage of /saveini and /loadini available.
Posted By: Tsunami Re: /writeini and /saveini - 27/12/03 02:05 PM
why not use /titlebar if you want to change the titlebar right away?
Posted By: Cheech Re: /writeini and /saveini - 27/12/03 04:04 PM
i had tryed that also but if i want to set the titlebar to
%title it just shows %title doesnt evaluate ? thats why i tryed to writeini..
Posted By: Hitchhiker Re: /writeini and /saveini - 27/12/03 05:09 PM
If you're using that command from the command line and want it to evaluate variables, you need 2 /'s like:

//titlebar %variablename

otherwise it will just do what you said
Posted By: Cheech Re: /writeini and /saveini - 27/12/03 05:12 PM
well no i actually was using it from a script but i finnaly figured it out i needed to use $eval .

thanks for all the responses smile
© mIRC Discussion Forums