Max's Color Text v2.5

By MaxEvans on Apr 18, 2009

This is my very first dialog. I was trying it out to see if I could figure dialogs out. And I decided to make a color text script so you can choose a color for your text, as well as bold or no bold.

It's pretty simple to use, all you do is either right click and select "Max's Color Text Settings" or type /ctext. And on the dialog, just type in a color without the ctrl+k (Example: 15,2 or 7).. check bold or underline boxes for bold and/or underline. Then click okay. Now your text will be the color you chose. I added a color index on the dialog so you can see the color numbers for reference. =]

[b]Changes in version 2:

  • Added underline feature.
  • Added an on/off switch.

    Changes in version 2.5:

  • Changed Bold/Underline radios to checkboxes[/b]

Screenshot:
Image

[b]Color Index Image:
Image

Just save that in the mIRC directory as "ColorIndex.png" without the quotes.[/b]

;~~~~~~~~~~~~~~~~~~~~~~~~~;
;  Max's Color Text v2.5  ;
;      By: Max Evans      ;
;    irc.geekshed.net     ;
;#GeekUnderground & #Chris;
;~~~~~~~~~~~~~~~~~~~~~~~~~;

dialog MCT {
  title "Max's Color Text v2.5"
  size -1 -1 112 116
  option dbu
  button "Okay", 4, 43 102 26 9, ok
  box "Text Properties", 5, 10 27 93 36
  edit "", 6, 56 37 30 10
  icon 9, 13 73 87 20, ColorIndex.png, 0, noborder
  box "Color Index", 10, 10 65 93 33
  text "Color Code", 18, 28 38 28 6
  box "Turn Script On/Off", 22, 10 2 93 23
  radio "On", 23, 29 11 19 10, group
  radio "Off", 24, 61 11 20 10
  check "Bold", 29, 28 50 20 7, left
  check "Underline", 30, 53 50 32 7, left
}

on *:DIALOG:MCT:init:0:{ 
  did -c $dname $iif(%mct.on,23,$iif(%mct.off,24,))
  $iif(%text.color,did -a $dname 6 %text.color)
  if (%mctbold = ) { did -c $dname 29 }
  if (%mctunderline = ) { did -c $dname 30 }
}
on *:DIALOG:MCT:sclick:*:{
  if ($did == 4) {
    if ($did(MCT,29).state = 1) { set %mctbold  } | else { unset %mctbold }
    if ($did(MCT,30).state = 1) { set %mctunderline  } | else { unset %mctunderline }
    set %text.color $did(MCT,6)
  }
  if ($did == 23) { enable #mctext | unset %mct.* | set %mct.on on }
  if ($did == 24) { disable #mctext | unset %mct.* | set %mct.off off }
}  

#mctext on
on *:input:*:if (!$regex($1-,^\/) && !$inpaste) { msg $active %mctunderline $+ %mctbold $+  $+ %text.color $+ $1- | halt }
#mctext end

menu * {
  .Max's Color Text Settings: { dialog -m MCT MCT }
}
alias ctext {
  $iif($dialog(MCT),dialog -c MCT MCT) dialog -m MCT MCT
}

Comments

Sign in to comment.
vinc3nt   -  Nov 29, 2010

it works very well for me...but it is incompatible with Acronym Manager...when i type, it returns 2 line....

 Respond  
MaxEvans   -  Feb 16, 2010

I'm working on those too. I'll add some presets in the next version.

 Respond  
L0ckp1ck   -  Feb 16, 2010

or what i should say is some preset color schemes

 Respond  
L0ckp1ck   -  Feb 16, 2010

ok i see. its not bad. would be nice with some background colour option added

 Respond  
napa182   -  Feb 16, 2010

L0ckp1ck read his intro it tells you how to use it and what to save for colorindex.png

Image
Just save that in the mIRC directory as "ColorIndex.png" without the quotes.

 Respond  
MaxEvans   -  Feb 16, 2010

That's because you need to save the image as shown above as "colorindex.png" to your mIRC root folder.

 Respond  
L0ckp1ck   -  Feb 16, 2010

this does not work * /dialog: 'MCT' error loading icon 'colorindex.png'

 Respond  
RicJames   -  Jun 15, 2009

cool

 Respond  
MaxEvans   -  Jun 11, 2009

I'll check it out. I'm working on another version of it. But I'm in Michigan on vacation right now, so I'll get it on here as soon as I can.

 Respond  
RicJames   -  Jun 01, 2009

nice work MaxEvans. But theres a problem sometimes it won't display numbers.

 Respond  
MaxEvans   -  Apr 20, 2009

All I can say is make sure you have the latest version of IRC. I tested it several times to make sure it all worked and I didn't have any problems.

 Respond  
Testor   -  Apr 20, 2009

like the new settings!
apparently, according to mIRC theres an error in these lines:

 did -c $dname $iif(%bold.on,20,$iif(%bold.off,21,))
  did -c $dname $iif(%mct.on,23,$iif(%mct.off,24,))
  did -c $dname $iif(%underline.on,25,$iif(%underline.off,26,))

i think the comma (,) after the (%underline.off,26,), etc causes it, as removing it stops it, but im not great at scripting so cant be sure :S

 Respond  
Cheiron   -  Apr 20, 2009

looks very nice and neat now. you might want to look at maybe doing the colours via check/radio if possible but it is no biggie if you cant. gets a nice 6 from me and a like

 Respond  
Kirby   -  Apr 19, 2009

Cool man, works much better.

Edit: Never mind

Though you can change one thing:

  if ($did == 25) { unset %underline.* | set %underline.on  }
  if ($did == 26) { unset %underline.* | set %underline.off none }

Instead of using variables to indicate whether a radio is checked, unchecked, or whichever is checked, you can use $did(name,id).status to do it without the use of variables.

 Respond  
MaxEvans   -  Apr 19, 2009

I updated it. Added underline and an on/off switch. =]

 Respond  
FordLawnmower   -  Apr 18, 2009

Nice idea using the existing .png :)

 Respond  
MaxEvans   -  Apr 18, 2009

Again, mIRC doesn't have italic. But I'm adding underline and an on/off feature right now. I'll have it updated soon.

 Respond  
Testor   -  Apr 18, 2009

i like it :D

But..

  • /did: insufficient parameters (line 18, script3.ini)
    E: I'd like to see underlined and italics too :)
 Respond  
Cheiron   -  Apr 18, 2009

how come mirc allows you to change font, size, colour and whether it bold, underline etc then from the toolbar under view - fonts? or is that totally different?

 Respond  
Jonesy44   -  Apr 18, 2009

There's no italic support in mIRC (In dialogs with DCX, i think) but not in plain mIRC :)

 Respond  
MaxEvans   -  Apr 18, 2009

I do. I thought of that as well, I'm adding that now. I also looked at "Italic", but found that there is no italic in the mIRC client. Everywhere I've looked returns nothing, unless it's in the new version. Which I can't find, so I don't think it is. But I'll add underline.

 Respond  
Jonesy44   -  Apr 18, 2009

Cos we didn't know what underlining is.. :P

 Respond  
Kirby   -  Apr 18, 2009

Cool Max, very nice for your first dialog.
Like Cheiron said, why not add some underlining?

 Respond  
Jonesy44   -  Apr 18, 2009

you might want to consider using $base() too, to make numbers with 1 digit into two digits (01,02 etc)

 Respond  
MaxEvans   -  Apr 18, 2009

That works. Thanks. =]

 Respond  
Jonesy44   -  Apr 18, 2009

My bad,

on *:input:*:if (!$regex($1-,^\/) && !$inpaste) { msg $active %bold.on  $+ %text.color $+ $1- | halt

:)

 Respond  
MaxEvans   -  Apr 18, 2009

When I tested that, I got this.

  • Invalid parameters: $regex
 Respond  
Jonesy44   -  Apr 18, 2009

You could make;

on :Input:: {
if (/* iswm $1-) { $1- | halt }
msg $active %bold.on $+ %text.color $+ $1- | halt
}

on *:input:*:if (!$regex(^\/) && !$inpaste) { msg $active %bold.on  $+ %text.color $+ $1- | halt
 Respond  
Cheiron   -  Apr 18, 2009

Looks ok at a glance. Nice approach on avoiding the usual colour selecting method. You might want to add italic and underline to the dialogue also. Plus try and see if it is possible to make the text and background colours selectable from use of radio or check buttons to make it easier rather than the number comma number currently in use

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.