mIRC Home    About    Download    Register    News    Help

Print Thread
$scheme #58580 31/10/03 11:21 AM
Joined: Apr 2003
Posts: 210
S
saxon Offline OP
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Apr 2003
Posts: 210
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.

Re: $scheme #58581 31/10/03 02:19 PM
Joined: Oct 2003
Posts: 273
E
EVH Offline
Fjord artisan
Offline
Fjord artisan
E
Joined: Oct 2003
Posts: 273
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)

Re: $scheme #58582 31/10/03 03:02 PM
Joined: Apr 2003
Posts: 210
S
saxon Offline OP
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Apr 2003
Posts: 210
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.


Re: $scheme #58583 31/10/03 03:10 PM
Joined: Oct 2003
Posts: 273
E
EVH Offline
Fjord artisan
Offline
Fjord artisan
E
Joined: Oct 2003
Posts: 273
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.

Last edited by EVH; 31/10/03 03:18 PM.
Re: $scheme #58584 31/10/03 05:03 PM
Joined: Oct 2003
Posts: 38
T
TheXenocide Offline
Ameglian cow
Offline
Ameglian cow
T
Joined: Oct 2003
Posts: 38
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.)


-TheXenocide
ParseMPopup
Re: $scheme #58585 29/12/03 01:55 PM
Joined: Jan 2003
Posts: 249
C
ClickHeRe Offline
Fjord artisan
Offline
Fjord artisan
C
Joined: Jan 2003
Posts: 249
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>