mIRC Home    About    Download    Register    News    Help

Print Thread
N
NoScRiPtR
NoScRiPtR
N
I need to read random lines from a text file (I know how to do this) with different color combinations for each line (I don't know how to do this).
Each line would have it's own control and color codes (some bold as well).
Is there something I've missed in the help files?

S
ScatMan
ScatMan
S
if i get u right, u want a random color for the line that has read
then do
$chr(3) $+ $r(1,15) $+ $read(file.txt)
if there is a case that the first letter in the file will be a number so better to use $base($r(1,15),10,10,2) except $r(1,15) so the number will be in double digit format

T
theRat
theRat
T
$+(<ctrl+k>,$r(0,15),$chr(44),$r(0,15) , $iif($r(0,1),<ctrl+b>) , $iif($r(0,1),<ctrl+u>) , $iif($r(0,1),<ctrl+r>) , $read(file.txt))

N
NoScRiPtR
NoScRiPtR
N
I want to be able to get the colors from the text file itself.
Each line will have it's own specific colors, but the lines will be randomly selected.
ex:
08,01 TEXT HERE 00,01 more text here

Joined: Mar 2003
Posts: 272
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Mar 2003
Posts: 272
If that's your syntax, it should appear in color if you simply use $read since the control code is stored and the file.

N
NoScRiPtR
NoScRiPtR
N
Should, but don't for some reason ... gets the text, but no formatting (mirc6.03, btw)
script follows:

.random: {
%lastcolor = $readini(my.ini,lastcolor,last)
inc %lastcolor 1
if (%lastcolor > 50) %lasttopic = 1
writeini my.ini lastcolor last %lastcolor
msg $chan $read(lastcolor.txt,%lastcolor)
}

this reads them sequentially (rather than randomly) but should STILL pick the color codes out, shouldn't it?


C
codemastr
codemastr
C
/write test.txt 3,4test
//echo -a $read(test.txt)

That prints in color for me. Are you sure lastcolor.txt has color codes? Are you sure you don't have color code stripping enabled?

N
NoScRiPtR
NoScRiPtR
N
I'm positive the text has color codes .. and I don't strip colors

C
codemastr
codemastr
C
well if you type //echo -a $read(the.file.name) does it use color codes?

N
NoScRiPtR
NoScRiPtR
N
yes it did .. I reinstalled mirc6.03 to a new folder and it works now .. go figure

thanks for trying, anyway


Link Copied to Clipboard