mIRC Home    About    Download    Register    News    Help

Print Thread
#180709 13/07/07 04:15 AM
Joined: Dec 2002
Posts: 271
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 271
hey,

i'm just curious about this, i have an addon that saves certain data to file and prints it, and a friend of mine suggested underlining/color coding certain items, and i know i cant do this in notepad, but i'm sure its possible in rtf format, does anyone know how i can write to an rtf file in this manner, or should i say what the char codes are that i need to use or whatever?


example:

/write file.rtf i want to write this in blue and underline, and this part bold

how would i accomplish this? thanks

Joined: Jan 2004
Posts: 509
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
If you know how to talk in blue or underline in mIRC, then you can do the same for the /write command..

Joined: Dec 2002
Posts: 271
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 271
yeah thats the first thing i thought of and tried, CTRL+U, doesnt work also tried the CTRL+K# and that doesnt work either, it just writes:
4this is underline and red

to the file

Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
mIRC control codes ONLY work in mIRC (and other IRC clients).

@OP
You need to find documentation that explains how the rtf format creates colors, underlines, etc. Click

-genius_at_work

Joined: Dec 2002
Posts: 271
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 271
lol, funny i was just reading that, and i'm not sure but i think thats how it works internally, and not with mirc's write command

Joined: Dec 2002
Posts: 271
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 271
hmmmm, i think i see how i can do it tho, i edited some text within an rtf doc, saved it and closed, renamed file to txt and looked at it and that shows me the internals, i think ithink i'll have to /write to a text file with all the rtf formatting in it, then /rename to a rtf and that should work...

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
You don't have to rename it afterwards. RTF files are just like regular text files, all that's different is that certain sequences of characters have special meaning (just as mIRC has its own set of control codes). All you have to do is convert mIRC's control codes to the RTF escape sequences, and then you can /write them to a file with any extension you want (.rtf, .txt, etc.). The extension doesn't affect the content of the file or what you can write to it with mIRC's commands, it only changes how Windows decides what program should run a file when it's double-clicked.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Dec 2002
Posts: 271
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 271
yah i got it sorted thanks...


Link Copied to Clipboard