mIRC Home    About    Download    Register    News    Help

Print Thread
P
piker
piker
P
how can I make an identifier like

$colour(04,this is my text in red)

Last edited by piker; 26/06/07 07:56 AM.
#179661 26/06/07 07:40 AM
5
5618
5618
5
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.

Last edited by 5618; 26/06/07 07:42 AM.
#179662 26/06/07 07:40 AM
Joined: Jun 2006
Posts: 506
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 506
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).

P
piker
piker
P
i tried that before and also tried //echo $isalias(colour)
this is why I kinda thought it was unexistant

#179664 26/06/07 07:46 AM
Joined: Jun 2006
Posts: 506
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 506
$isalias won't show it but it is the original spelling of $color().

//echo -ag $colour(12) = $color(12)

#179666 26/06/07 07:55 AM
P
piker
piker
P
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- ) }

Last edited by piker; 26/06/07 07:57 AM.
#179680 26/06/07 02:07 PM
Joined: Oct 2005
Posts: 1,671
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,671
$isalias only shows aliases (commands that you have created). mIRC's internal commands and identifiers are excluded from $isalias searches.

-genius_at_work


Link Copied to Clipboard