mIRC Homepage
Posted By: yamaz Sound events identifier - 19/10/03 11:47 AM
Is there an identifier that returns if the event beeps (/ebeeps [on] [off]) are on? I did not find it in the help. Thank you very much.
Posted By: Online Re: Sound events identifier - 19/10/03 12:04 PM
Use $gettok($readini($mircini,options,n5),15,44) (1 = on, 0 = off. Reference here).

If you enable or diable sounds in the options dialog, changes in the INI file will take effect immediately and $readini will return the current state. However, if you use the command /ebeeps to enable or disable sounds, changes will take effect only after you opened the options dialog, restarted mirc or typed /saveini.
Posted By: yamaz Re: Sound events identifier - 19/10/03 01:59 PM
thanks a lot smile
Posted By: Online Re: Sound events identifier - 19/10/03 02:05 PM
Welcome laugh
Posted By: yamaz Re: Sound events identifier - 19/10/03 05:51 PM
there's still a little problem. with this script:

/snd {
%snd = $gettok($readini($mircini,options,n5),15,44)
if (%snd == 1) { .echo -a Sounds are now disabled | /ebeeps 0 | halt }
else { .echo -a Sounds are now enabled | /ebeeps 1 | halt }
}

i get a "* Event beeps are on" on the active window, and I dont want that. How can I avoid that? Thanks again
Posted By: sparta Re: Sound events identifier - 19/10/03 05:52 PM
echo -a = active
echo -s = status window
.echo -q = quiet

also look at /help echo
Posted By: yamaz Re: Sound events identifier - 19/10/03 06:07 PM
no, i dont want to see the automatic mirc message. I wanna se the one i wrote! nothing to do with -echo command
Posted By: sparta Re: Sound events identifier - 19/10/03 06:09 PM
/debug @debug .. then see what cosing that text you want to hide, then make a haltdef on it..
Posted By: yamaz Re: Sound events identifier - 19/10/03 06:16 PM
thanks but in this case it doesnt work......debug monitors only SERVER raws (as far as I know), and there's no server raw when changing sound options frown
Posted By: sparta Re: Sound events identifier - 19/10/03 06:22 PM
it monitor all commands sended to and from mirc.. open the window, then send the command u want to look at, then see what the window says.. "i think it monitor everything, i havent seen anything it dont handle" smile
Posted By: yamaz Re: Sound events identifier - 19/10/03 06:47 PM
i was right wink if i execute my /snd command nothing happens in the debug window
Posted By: Tsunami Re: Sound events identifier - 19/10/03 07:51 PM
sparta: it monitors all commands from and to the server, but not local commands like /snd
yamaz: don't put a . before echo if you want to see it (if that's not what you mean, then please explain, because I don't see any other problems...)
Posted By: yamaz Re: Sound events identifier - 19/10/03 08:34 PM
I'll explain it again:

/snd {
%snd = $gettok($readini($mircini,options,n5),15,44)
if (%snd == 1) { .echo -a Sounds disabled | /ebeeps off | /saveini }
else { .echo -a Sounds enabled | /ebeeps on | /saveini }
}

if i give the /snd command i get this in the active window:

[C] Sounds are now disabled
* Event beeps are off

the first row ([C] Sounds are now disabled) is the row that I want to see, the second row (* Event beeps are off) is the row i DON'T WANT to see, cause it's the default mirc message for disabling event beeps. How can I get rid of that crap? Thanks smile

Posted By: Collective Re: Sound events identifier - 19/10/03 08:38 PM
/snd {
%snd = $gettok($readini($mircini,options,n5),15,44)
if (%snd == 1) { echo -a Sounds disabled | .ebeeps off | saveini }
else { echo -a Sounds enabled | .ebeeps on | saveini }
}
Posted By: yamaz Re: Sound events identifier - 19/10/03 08:46 PM
Oh my.........

I really don't beliive how stupid my question was......I'm sleeping frown Sorry guys
Posted By: neophyte Re: Sound events identifier - 20/10/03 02:58 AM
echo -q is really usefull for creating a command that you wish to have the option of being a quiet command.

For example, I have created my own custom say and msg commands, and I have used the -q switch to allow the msg command to be silent.

You do no need to use a . in the echo statement, because using the alias preceeded by a . will make it silent.

Eg:

/.msg #channel boo
© mIRC Discussion Forums