mIRC Home    About    Download    Register    News    Help

Print Thread
/echo without -m does not work as expected #261539
18/10/17 08:57 AM
18/10/17 08:57 AM
Joined: Aug 2003
Posts: 227
UK
P
Protopia Offline OP
Fjord artisan
Protopia  Offline OP
Fjord artisan
P

Joined: Aug 2003
Posts: 227
UK
mIRC 7.51 - a variety of possible bugs with /echo switches.

The echo command without -m and -n flags does not make switchbar / treebar colour change to the "event" colour regardless of whether /echo is running in an event or not.

To reproduce:

1. /query x1 - opens a query window - button colour black
2. /echo x1 test - button stays black
3. /echo -m x1 - button turns "message" colour
4. switch to window and back to clear colour
Using a remote with "on *:signal:echotest: echo $1-":
5. /signal echotest x1 test - button stays black (even though this is now an event)
6. /signal echotest -m x1 test - button turns "message" colour.

I also tried this using Text, Action, Join, Part and Quit events with the same result.

Last edited by Protopia; 18/10/17 10:50 AM. Reason: Remove beeping/lashing issue as these do work (so long as you understand what they are supposed to do)
Re: /echo without -m does not work as expected [Re: Protopia] #261543
18/10/17 12:01 PM
18/10/17 12:01 PM
Joined: Jan 2004
Posts: 1,271
L
Loki12583 Offline
Hoopy frood
Loki12583  Offline
Hoopy frood
L

Joined: Jan 2004
Posts: 1,271
I don't believe /echo is supposed to change the highlight of windows based on the event it's called from. That said, I have no idea what -n is supposed to do.

Re: /echo without -m does not work as expected [Re: Loki12583] #261544
18/10/17 12:15 PM
18/10/17 12:15 PM
Joined: Feb 2003
Posts: 2,607
Raccoon Offline
Hoopy frood
Raccoon  Offline
Hoopy frood

Joined: Feb 2003
Posts: 2,607
If your switchbar 'Event' color is red, like mine, then /echo will turn it from black to red. If you use /echo -n, it would remain black. Of course, if the color is already blue for 'Message' or green for 'Highlight' then it wouldn't change either way.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: /echo without -m does not work as expected [Re: Protopia] #261546
18/10/17 05:35 PM
18/10/17 05:35 PM
Joined: Jan 2004
Posts: 1,159
maroon Offline
Hoopy frood
maroon  Offline
Hoopy frood

Joined: Jan 2004
Posts: 1,159
Protopia, is there a different effect depending on whether your query window is minimized or just clicked away from? And does it matter whether or not your windows are maximized or in a smaller window? I'm getting your observed behavior with /signal only when the target window is not minimized, which should still be considered a bug.

Using the 7.51 beta in win7-32, i do the following commands:

Quote:

//window -c @abc | window -c @xyz | window @abc | window @xyz | window -a "status window" | window -n @abc | echo @abc $asctime | echo @xyz $asctime
//window -c @abc | window -c @xyz | window @abc | window @xyz | window -a "status window" | window -n @abc | echo -m @abc $asctime | echo -m @xyz $asctime


If status window is a non-minimized non-maximized window, @abc switchbar icon gets the message or event color, depending on whether -m is used or not.
However if I first maximize the status window to full screen, then both windows get the message/event color depending on whether -m is used. In mirc 6.35, both windows would change to the appropriate color, and do it regardless whether status window was maximized or not.

Protopia, check if your query window gets colored when you minimize it and not just click away to another active window. Also, it seems to have the same effect as minimizing the target window if i use a timer to delay the echo to @xyz until mIRC is not the active app, even if status window isn't maximized.

Re: /echo without -m does not work as expected [Re: maroon] #261549
18/10/17 07:13 PM
18/10/17 07:13 PM
Joined: Aug 2003
Posts: 227
UK
P
Protopia Offline OP
Fjord artisan
Protopia  Offline OP
Fjord artisan
P

Joined: Aug 2003
Posts: 227
UK
I get the same results whether windows are minimised or not.

Originally Posted By: maroon
Protopia, is there a different effect depending on whether your query window is minimized or just clicked away from? And does it matter whether or not your windows are maximized or in a smaller window? I'm getting your observed behavior with /signal only when the target window is not minimized, which should still be considered a bug.

Using the 7.51 beta in win7-32, i do the following commands:

Quote:

//window -c @abc | window -c @xyz | window @abc | window @xyz | window -a "status window" | window -n @abc | echo @abc $asctime | echo @xyz $asctime
//window -c @abc | window -c @xyz | window @abc | window @xyz | window -a "status window" | window -n @abc | echo -m @abc $asctime | echo -m @xyz $asctime


If status window is a non-minimized non-maximized window, @abc switchbar icon gets the message or event color, depending on whether -m is used or not.
However if I first maximize the status window to full screen, then both windows get the message/event color depending on whether -m is used. In mirc 6.35, both windows would change to the appropriate color, and do it regardless whether status window was maximized or not.

Protopia, check if your query window gets colored when you minimize it and not just click away to another active window. Also, it seems to have the same effect as minimizing the target window if i use a timer to delay the echo to @xyz until mIRC is not the active app, even if status window isn't maximized.


Re: /echo without -m does not work as expected [Re: Protopia] #261550
18/10/17 07:14 PM
18/10/17 07:14 PM
Joined: Aug 2003
Posts: 227
UK
P
Protopia Offline OP
Fjord artisan
Protopia  Offline OP
Fjord artisan
P

Joined: Aug 2003
Posts: 227
UK
P.S. I have reverted your experimental example on WikiChip because IMO we should work out how mIRC works and document it on WikiChip not use WikiChip to post experimental code in the guise of an example.

Re: /echo without -m does not work as expected [Re: Protopia] #261551
18/10/17 07:24 PM
18/10/17 07:24 PM
Joined: Apr 2004
Posts: 839
The Netherlands
Sat Offline
Hoopy frood
Sat  Offline
Hoopy frood

Joined: Apr 2004
Posts: 839
The Netherlands
Originally Posted By: Protopia
To reproduce:

1. /query x1 - opens a query window - button colour black
2. /echo x1 test - button stays black

Cannot reproduce: button text changes to blue (7.51)


Saturn, QuakeNet staff
Re: /echo without -m does not work as expected [Re: Protopia] #261553
18/10/17 07:43 PM
18/10/17 07:43 PM
Joined: Jan 2004
Posts: 1,159
maroon Offline
Hoopy frood
maroon  Offline
Hoopy frood

Joined: Jan 2004
Posts: 1,159
But do you get the same result when Status Window is *maximized*?

//window -ax "Status Window"
vs
//window -ar "Status Window"

Re: /echo without -m does not work as expected [Re: Protopia] #261567
19/10/17 02:30 PM
19/10/17 02:30 PM
Joined: Dec 2002
Posts: 4,451
London, UK
Khaled Offline

Hoopy frood
Khaled  Offline

Hoopy frood

Joined: Dec 2002
Posts: 4,451
London, UK
Quote:
The -m switch indicates that the line should be treated as a user message, not an event.

This means that /echo -m text will process the text as if it was an incoming user message, ie. a PRIVMSG in a query/channel window. Anything that is not a PRIVMSG is an event, eg. join/part/mode/etc. It has nothing to do with script events.

Re: /echo without -m does not work as expected [Re: Khaled] #261568
19/10/17 02:47 PM
19/10/17 02:47 PM
Joined: Aug 2003
Posts: 227
UK
P
Protopia Offline OP
Fjord artisan
Protopia  Offline OP
Fjord artisan
P

Joined: Aug 2003
Posts: 227
UK
Ok - I think I have it sussed now.

My event colour was dark blue which is barely distinguishable from black when it is switchbar text.

So, as far as I can tell, if text is black, /echo without -m turns it "event" coloured, /echo with -m turns it "message" coloured, but /echo no -m does not turn it back to "event" colour.

So -n only stops it turning "event" coloured.

@Khaled: Is that how it is supposed to work? Is there any way to change the colour back or change it without an echo?

Last edited by Protopia; 19/10/17 02:48 PM.
Re: /echo without -m does not work as expected [Re: Protopia] #261570
19/10/17 04:13 PM
19/10/17 04:13 PM
Joined: Apr 2004
Posts: 839
The Netherlands
Sat Offline
Hoopy frood
Sat  Offline
Hoopy frood

Joined: Apr 2004
Posts: 839
The Netherlands
That is how the color is handled normally as well: the message color trumps the event color, and the highlight color trumps the message color. For example:
- person joins a channel: button text turns blue
- person types something: button text turns red
- person leaves channel: button text stays red (as opposed to turning blue again)

You can use /window -gN to set the color explicitly.


Saturn, QuakeNet staff
Re: /echo without -m does not work as expected [Re: Protopia] #261572
19/10/17 04:42 PM
19/10/17 04:42 PM
Joined: Jan 2004
Posts: 1,159
maroon Offline
Hoopy frood
maroon  Offline
Hoopy frood

Joined: Jan 2004
Posts: 1,159
Yes you can change the switchbar icon to one of the 3 highlight colors:

Quote:
/window -gN #channel

-g[N] - Set/Unset highlight for window button; 0 = non, 1 = message color, 2 = highlight color

undocumented is: 3= event color.


Also, note: related to my issue mentioned up-thread, where echo did not color the switchbar icon unless either the active window was +x maximized or the target @window/#channel was -n minimized, I'm finding the same resistance to coloring the switchbar icon using /window -gN under the same conditions, which possibly means that my earlier bug report about "echo -m" is really about "window -gN" if echo's -m switch is using window -g1.

For me, this will change color for @abc:

Code:
//window -c @abc | window @abc | window -ax "status window" | window -g1 @abc


This will not change color for @abc:

Code:
//window -c @abc | window @abc | window -a "status window" | window -r "status window" | window -g1 @abc


I haven't yet found someone else having this same problem who also used the beta, so I don't know if it's because i'm using win7-32. The bug happens whether or not I have /remote on or off:

//echo -a $os $version $beta $md5($mircexe,2) $file($mircexe).sig $alias(0) $script(0) $dll(0) $com(0) $remote

gives me:
7 7.51 60 3b4e26e8247d366ed6e7a413aba4ec42 ok 1 7 0 0 0

Edit: forgot to mention that i exited and restarted mIRC and the same bugged behavior remained.


Last edited by maroon; 19/10/17 05:36 PM.
Re: /echo without -m does not work as expected [Re: Khaled] #261574
19/10/17 05:52 PM
19/10/17 05:52 PM
Joined: Aug 2003
Posts: 227
UK
P
Protopia Offline OP
Fjord artisan
Protopia  Offline OP
Fjord artisan
P

Joined: Aug 2003
Posts: 227
UK
Originally Posted By: Khaled

This means that /echo -m text will process the text as if it was an incoming user message, ie. a PRIVMSG in a query/channel window. Anything that is not a PRIVMSG is an event, eg. join/part/mode/etc. It has nothing to do with script events.

A couple of questions:

1. ACTION and CTCP are based on PRIVMSG: do they count as incoming user messages?

2. Are NOTICE based messages (i.e. /notice, /ctcpreply) in a query/channel window considered incoming user messages in the same way?

Re: /echo without -m does not work as expected [Re: Khaled] #261575
19/10/17 07:16 PM
19/10/17 07:16 PM
Joined: Jul 2006
Posts: 3,518
France
W
Wims Offline
Hoopy frood
Wims  Offline
Hoopy frood
W

Joined: Jul 2006
Posts: 3,518
France
What does -m implies exactly ? Incoming privmsg would apply stripping option for example, the -m switch does not do that. What is concretly done by -m that isn't done without -m, except the coloring of the bar item ?


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: /echo without -m does not work as expected [Re: Wims] #261576
19/10/17 07:35 PM
19/10/17 07:35 PM
Joined: Aug 2003
Posts: 227
UK
P
Protopia Offline OP
Fjord artisan
Protopia  Offline OP
Fjord artisan
P

Joined: Aug 2003
Posts: 227
UK
Originally Posted By: Wims
What does -m implies exactly ? Incoming privmsg would apply stripping option for example, the -m switch does not do that. What is concretely done by -m that isn't done without -m, except the coloring of the bar item ?


AFAIK -m, -n or neither are only to do with switchbar / treebar colouring (like /window -gN).

Obviously mIRC processing of PRIVMSGS has several steps, one of which is colouring the switchbar / treebar. By having /echo -r or using $strip allows script writers fine control over different aspects.

Re: /echo without -m does not work as expected [Re: maroon] #261583
20/10/17 02:50 AM
20/10/17 02:50 AM
Joined: Jan 2004
Posts: 1,159
maroon Offline
Hoopy frood
maroon  Offline
Hoopy frood

Joined: Jan 2004
Posts: 1,159
Quote:

//window -c @abc | window @abc | window -a "status window" | window -r "status window" | window -g1 @abc


Update: I did a fresh install of mirc 7.51 into a fresh folder, and this series of commands enabled echo -m to highlight the @abc window in red like it's supposed to. I then quit that fresh mirc and copied the mirc.ini from the mirc folder where it wasn't turning red, and the bug reappeared.

So now i get the fun task of pasting changes from the 'bad' mirc.ini until i get the problem to show up again.

Edit: Turns out it was the unchecked mirc-options/display/always-highlight-on-message. So, without that box checked, echo -m only highlights when mirc considers the window to not be visible - either from the active window being a different window that's maximized, or if the target window is minimized, or if mirc isn't the active App.

Last edited by maroon; 20/10/17 03:29 AM.