|
Joined: Sep 2004
Posts: 237
Fjord artisan
|
OP
Fjord artisan
Joined: Sep 2004
Posts: 237 |
I have a gettok and if token == 0 i want to write to ini, change 0 to 1. [options] n0=0,1,0,1,0,0,300,1,0,1,1,0,0,0,1,1,0,1,0,1,4096,0,0,1,0,0,1,1,0,50,1,0,0,0,0
I wouldnt normaly have a problem writing to an ini, but i dont know how to set item in this case. Thanks for all the help guys!
|
|
|
|
nycdiesel
|
nycdiesel
|
var %var = n0=0,1,0,1,0,0,300,1,0,1,1,0,0,0,1,1,0,1,0,1,4096,0,0,1,0,0,1,1,0,50,1,0,0,0,0
if (!$gettok(%var,32,44)) { %var = $puttok(%var,1,32,44) }
writeini filename options n0 %var
hope this helps. the 32 is the position of the token you hilighted in red.
Last edited by nycdiesel; 05/02/05 08:15 AM.
|
|
|
|
Joined: Sep 2004
Posts: 237
Fjord artisan
|
OP
Fjord artisan
Joined: Sep 2004
Posts: 237 |
Tried that but it didnt write the line back in there, it simply made a new n0 entry.... errr, it was slightly different,but i dont recall exactly how right now.(n0 32=1 perhaps).
|
|
|
|
nycdiesel
|
nycdiesel
|
you could try to remini the item from the section and then writeini to the file.
eg; remini filename Options n0 writeini filename Options n0 value
Last edited by nycdiesel; 05/02/05 08:22 AM.
|
|
|
|
DaveC
|
DaveC
|
that line looks like part of one of the mirc ini files, you do know you cant update them in mirc, as mirc well update them over you again. (at least on alot of items i beleive)
|
|
|
|
Joined: Sep 2004
Posts: 237
Fjord artisan
|
OP
Fjord artisan
Joined: Sep 2004
Posts: 237 |
Thats what i was thinking DaveC, but those controls are for show mode prefix, prefix own msgs, and turn addressbook colors on.So i was just hoping i could run it automatically on script load. I dont think it would be too much trouble to write one more sentence in the read me file, the only problem is that morons never read the read me files.
|
|
|
|
Iori
|
Iori
|
Well, I can help you with one of those, turning nick colors on|off
|
|
|
|
|