mIRC Home    About    Download    Register    News    Help

Print Thread
#110183 05/02/05 07:42 AM
Joined: Sep 2004
Posts: 237
J
JAFO Offline OP
Fjord artisan
OP Offline
Fjord artisan
J
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!

#110184 05/02/05 08:11 AM
N
nycdiesel
nycdiesel
N
Code:
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.
#110185 05/02/05 08:17 AM
Joined: Sep 2004
Posts: 237
J
JAFO Offline OP
Fjord artisan
OP Offline
Fjord artisan
J
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).

#110186 05/02/05 08:20 AM
N
nycdiesel
nycdiesel
N
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.
#110187 05/02/05 08:48 AM
D
DaveC
DaveC
D
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)

#110188 05/02/05 05:24 PM
Joined: Sep 2004
Posts: 237
J
JAFO Offline OP
Fjord artisan
OP Offline
Fjord artisan
J
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.

#110189 05/02/05 05:45 PM
I
Iori
Iori
I
Well, I can help you with one of those, turning nick colors on|off
  • /cnick on
    /cnick off


Link Copied to Clipboard