Originally Posted By: firefox
1. can I change that on text event to an alias?
2. I assume it would work fine if I was adding removing networks and channels and at some point there was only 1 network and 1 channel listed?
3. What if I want to send to #channel1 in blue colour and #channel2 in red?


1) Yes, I suppose so. Just create the alias definition, copy and paste, then update anything you might need to change so that it's compatible as a command rather than a triggered event.
2) Yes, that would work fine, though it wouldn't do anything at that point, since it only sends to channels other than the one it triggers in, and if you only have 1 listed, then there isn't any "other" channels for it to send to.
3) Create a third variable, probably call it %colorList, and format it $+($chr(3),2) repeatedly but seperated by spaces (if doing it in mIRC's own editor, you can just use Ctrl + K, followed by the number). In the part where the message is sent, use $+(%chan,: <,$nick,> $gettok(%colorList,%a,32),$1-) instead of what's currently there.

Formatting it for an alias might take some extra work compared to the other 2. For example, $chan will almost likely not be available unless triggered from an event like on Text. You'd need some way of telling it what channel to check for, so possibly use $active if it runs by typing the command (assuming that is a channel, you'll want to add a check for the possibility that the active window isn't a channel, and possibly display an error message and halt the script if it isn't).