mIRC Homepage
Posted By: saxon $scheme - 31/10/03 11:21 AM
Returns the name of the color scheme currently in use. When I use certain color schemes, I like to display the default text on certain events differently. This identifier makes that easier, enabling my events to show the default text or not, depending on which scheme is in use.

If not that then an on *:SCHEME: event, that triggers when a scheme is changed. So that an event processing script could be unloaded/loaded. Some people might also find other advantages in on *:SCHEME.
Posted By: EVH Re: $scheme - 31/10/03 02:19 PM
I agree with this suggestion.
But until we get it, IF we get it, I use this ..
Code:
alias theme return $readini($mircini,text,theme)
Posted By: saxon Re: $scheme - 31/10/03 03:02 PM
Yes, I am aware you can read the mIRC.ini to ascertain which scheme is in use. That is fine for some purposes.

But, it's not good to do that in an on *:TEXT event. It causes my HD to make noises, And is just not a good idea to continually read the mirc.ini everytime somebody types, And on other events also.

Posted By: EVH Re: $scheme - 31/10/03 03:10 PM
I totally agree with reading a file everytime
someone types, notice the part where I said ...

"I agree with this suggestion.
But until we get it, IF we get it, I use this .."


But to cut down on accessing the file if
you're all that worried about it you could ..

Code:
alias theme {
  if (%mirc.theme != $null) return %mirc.theme
  set -u30 %mirc.theme $readini($mircini,text,theme)
  return %mirc.theme
}


That would read from the file only every 30 secs max.

Note: Again, this is just a temporary solution
for a feature that I too hope will be added.
Posted By: TheXenocide Re: $scheme - 31/10/03 05:03 PM
it's funny, i suggested this feature before but nobody seemed to care at the time... lol, anyway, I personally agree as well. i think it would also be nice to remove the hassle of having to reading mirc.ini to find out about the inactive color schemes as well, a sample of what i feel might be appropriate in the future:
$scheme(0) = Count
$scheme(Name/N) = N/Name
$scheme(Name/N,N2) = Color N2 in the set of 15 colors
$scheme(Name/N,ColorName) = Color for ColorName (ie action, ctcp, etc.)
Posted By: ClickHeRe Re: $scheme - 29/12/03 01:55 PM
And I would add that we could create an empty scheme based on mIRC's default with /color -m <scheme> so we could actually create schemes that match Themes/Schemes in a theme engine like MTS or XTS. This would greatly speed up things to load the color settings of themes because with the $scheme we could know if the color scheme already exists and thus just load it with /color -s <scheme>
© mIRC Discussion Forums