mIRC Home    About    Download    Register    News    Help

Print Thread
#65397 26/12/03 07:54 AM
Joined: Dec 2002
Posts: 332
C
Cheech Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
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 ?

#65398 26/12/03 08:08 AM
Joined: Nov 2003
Posts: 227
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Nov 2003
Posts: 227
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.



#65399 26/12/03 07:18 PM
Joined: Dec 2002
Posts: 332
C
Cheech Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
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 .

#65400 27/12/03 02:07 AM
Joined: Dec 2002
Posts: 332
C
Cheech Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
anybody can explain this ?

#65401 27/12/03 02:15 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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.


-KingTomato
#65402 27/12/03 02:05 PM
Joined: Oct 2003
Posts: 50
T
Babel fish
Offline
Babel fish
T
Joined: Oct 2003
Posts: 50
why not use /titlebar if you want to change the titlebar right away?

#65403 27/12/03 04:04 PM
Joined: Dec 2002
Posts: 332
C
Cheech Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
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..

#65404 27/12/03 05:09 PM
Joined: Nov 2003
Posts: 227
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Nov 2003
Posts: 227
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

#65405 27/12/03 05:12 PM
Joined: Dec 2002
Posts: 332
C
Cheech Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
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


Link Copied to Clipboard