mIRC Homepage
Posted By: piker Identifier question [RESOLVED] - 26/06/07 07:24 AM
how can I make an identifier like

$colour(04,this is my text in red)
Posted By: 5618 Re: Identifier question - 26/06/07 07:40 AM
Code:
alias colour {
  %x =  $+ $1 $2-
  return %x
}


//say $colour(04, see the result here)

(Note: I used $colour instead of $color on purpose since $color is already an identifier)

Edit: $color and $colour are interchangeable existing identifiers, but you can override one of them in this way, with the alias, while still keeping the other. You may choose another alias name too.
Posted By: deegee Re: Identifier question - 26/06/07 07:40 AM
Code:
alias coloured return $+(,$base($1,10,10,2),$$2-,)


You can't use $colour() as it is an inbuilt mIRC identifier ($color and $colour both).
Posted By: piker Re: Identifier question - 26/06/07 07:42 AM
i tried that before and also tried //echo $isalias(colour)
this is why I kinda thought it was unexistant
Posted By: deegee Re: Identifier question - 26/06/07 07:46 AM
$isalias won't show it but it is the original spelling of $color().

//echo -ag $colour(12) = $color(12)
Posted By: piker Re: Identifier question - 26/06/07 07:55 AM
thanks guys for the replies I made this one based in both of your snippets for somebody who's after the same thing:

kol { return $+(,$1,$$2- ) }
Posted By: genius_at_work Re: Identifier question - 26/06/07 02:07 PM
$isalias only shows aliases (commands that you have created). mIRC's internal commands and identifiers are excluded from $isalias searches.

-genius_at_work
© mIRC Discussion Forums