Jump to content

on *:INPUT ( Text Color Básic ) ? Help


ElMataReyes

Recommended Posts

Hi. I could already make the menu color + bold. Now .. How do I adapt it to the input?

 

menu * {
  COLOR DE FUENTE
  .Negrita: {
    if (!%Negrita)  {
      set %Negrita 1
      halt
    }
    unset %Negrita
  }
  .Color de Texto
  ..0 Blanco: set %SelectFont 0
  ..1 Negro: set %SelectFont 1
  ..2 Azul: set %SelectFont 2
  ..4 Rojo suave: set %SelectFont 4
  ..5 Marrón: set %SelectFont 5
  ..6 Purpura: set %SelectFont 6
  ..7 Naranja: set %SelectFont 7
  ..9 Verde agua: set %SelectFont 9
  ..10 Celeste: set %SelectFont 10
  ..12 Azul suave: set %SelectFont 12
  ..13 Rosa: set %SelectFont 13
  ..14 Gris: set %SelectFont 14
}

 

on *:INPUT:*: {
  if ($left($1,1) != /) {
    haltdef
    if $active ischan {

      var %n = $iif($me !isreg $chan,$left($nick($chan,$me).pnick,1),$chr(240))
      var %echo.text = $+(4[,$chr(2),$chr(3),$+($replace(%n,@,4@,&,4&,%,14%,~,4~,+,5+,$chr(240),15),$chr(32),1),$me,$chr(2),$chr(3),4 ]) 1: $1-
    }
    else {

      var %echo.text = $+(4[,$chr(2),$chr(3),$+($replace(%n,@,4@,&,4&,%,14%,~,4~,+,5+,$chr(240),15),$chr(32),1),$me,$chr(2),$chr(3),4 ]) 1: $1-
    }  
    echo -tm $active %echo.text 
    .msg $active 1 $1-
  }
}

Edited by ElMataReyes
Link to comment
Share on other sites

err0r Thank you. I know it. Sorry, maybe I don't know well.

 

I have this menu:

menu * {
  Font Color
  .Negrita: {
    if (!%Negrita)  {
      set %Negrita 1
      halt
    }
    unset %Negrita
  }
  .Color de Texto
  ..0 Blanco: set %SelectFont 0
  ..1 Negro: set %SelectFont 1
  ..2 Azul: set %SelectFont 2
  ..4 Rojo suave: set %SelectFont 4
  ..5 Marrón: set %SelectFont 5
  ..6 Purpura: set %SelectFont 6
  ..7 Naranja: set %SelectFont 7
  ..9 Verde agua: set %SelectFont 9
  ..10 Celeste: set %SelectFont 10
  ..12 Azul suave: set %SelectFont 12
  ..13 Rosa: set %SelectFont 13
  ..14 Gris: set %SelectFont 14
}
on *:input:#: {
  set  %ColorFuente $+ %SelectFont
  if (%Negrita) {
    set %ColorFuente $+ %ColorFuente
  }
  msg $chan %ColorFuente $+ $strip($1-)
  halt
}

Everything works perfect.

What I need is "change the INPUT", for the following:

on *:INPUT:*: {
  if ($left($1,1) != /) {
    haltdef
    if $active ischan {

      var %n = $iif($me !isreg $chan,$left($nick($chan,$me).pnick,1),$chr(240))
      var %echo.text = $+(4[,$chr(2),$chr(3),$+($replace(%n,@,4@,&,4&,%,14%,~,4~,+,5+,$chr(240),15),$chr(32),1),$me,$chr(2),$chr(3),4 ]) 1: $1-
    }
    else {

      var %echo.text = $+(4[,$chr(2),$chr(3),$+($replace(%n,@,4@,&,4&,%,14%,~,4~,+,5+,$chr(240),15),$chr(32),1),$me,$chr(2),$chr(3),4 ]) 1: $1-
    }  
    echo -tm $active %echo.text 
    .msg $active 1 $1-
  }
}

Let me change the text color in the "INPUT"

Link to comment
Share on other sites

This is a simplified version but you can always use mirc's built in color for on input. It's called own so you could use $color(own) to get the number and $chr(3) $+ $color(own). But using what you had the below should work.. edit as needed.

menu * {
  Font Color
  .$iif(%Negrita,$style(1)) Negrita: { $iif(%Negrita,unset %Negrita,set %Negrita on) }
  .-
  .Color de Texto
  ..$iif(%SelectFont == 00,$style(1)) 0 Blanco: set %SelectFont 00
  ..$iif(%SelectFont == 01,$style(1)) 1 Negro: set %SelectFont 01
  ..$iif(%SelectFont == 02,$style(1)) 2 Azul: set %SelectFont 02
  ..$iif(%SelectFont == 04,$style(1)) 4 Rojo suave: set %SelectFont 04
  ..$iif(%SelectFont == 05,$style(1)) 5 Marrón: set %SelectFont 05
  ..$iif(%SelectFont == 06,$style(1)) 6 Purpura: set %SelectFont 06
  ..$iif(%SelectFont == 07,$style(1)) 7 Naranja: set %SelectFont 07
  ..$iif(%SelectFont == 09,$style(1)) 9 Verde agua: set %SelectFont 09
  ..$iif(%SelectFont == 10,$style(1)) 10 Celeste: set %SelectFont 10
  ..$iif(%SelectFont == 12,$style(1)) 12 Azul suave: set %SelectFont 12
  ..$iif(%SelectFont == 13,$style(1)) 13 Rosa: set %SelectFont 13
  ..$iif(%SelectFont == 14,$style(1)) 14 Gris: set %SelectFont 14
}

on *:INPUT:*: {
  if ($1 == /me) {
    .describe $target $2-
    echo -tm $target $chr(3) $+ $color(action) $me $2-
    haltdef
  }
  if ($left($1,1) != /) {
    echo -tm $target < $+ $me $+ > $iif(%Negrita,$chr(2)) $+ $iif(%SelectFont,$chr(3) $+ %SelectFont) $+ $1- 
    .msg $target $iif(%Negrita,$chr(2)) $+ $iif(%SelectFont,$chr(3) $+ %SelectFont) $+ $1-
    haltdef
  }
} 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...