mIRC Home    About    Download    Register    News    Help

Print Thread
Treebar update #232682
16/06/11 02:01 AM
16/06/11 02:01 AM
Joined: Jul 2006
Posts: 3,515
France
W
Wims Offline OP
Hoopy frood
Wims  Offline OP
Hoopy frood
W

Joined: Jul 2006
Posts: 3,515
France
I noticed that after a loop, sometimes a bug occurs with the treebar update, I managed to reproduce it with a specific code.
Type this in a status window:
Code:
//Echo -a $time | var %a 1000000 | while (%a) dec %a | echo -a $time
when it's done, wait one second and change the active window, the color of the item in the treebar for that status window is the Event color (options > display), instead of black.

Also, the -g[N] switch for /window supports N = 3, (set the Event color), but it's not documented in the help file wink


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Treebar update [Re: Wims] #232683
16/06/11 02:55 AM
16/06/11 02:55 AM
Joined: Dec 2002
Posts: 339
D
drum Offline
Fjord artisan
drum  Offline
Fjord artisan
D

Joined: Dec 2002
Posts: 339
How is this a bug? You are echoing to a non-active window so it gets marked with the event color. Sounds like expected behavior to me.

Re: Treebar update [Re: drum] #232684
16/06/11 03:00 AM
16/06/11 03:00 AM
Joined: Jul 2006
Posts: 3,515
France
W
Wims Offline OP
Hoopy frood
Wims  Offline OP
Hoopy frood
W

Joined: Jul 2006
Posts: 3,515
France
Quote:
when it's done, wait one second and change the active window
You must wait the end of the loop + ~1 second before changing the active window, so the text is echoed to the active window


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Treebar update [Re: Wims] #232687
16/06/11 03:49 AM
16/06/11 03:49 AM
Joined: Dec 2002
Posts: 339
D
drum Offline
Fjord artisan
drum  Offline
Fjord artisan
D

Joined: Dec 2002
Posts: 339
Ah, I see what you mean now. My guess is this is because Windows treats the application as "not responding" after 5 seconds. When it enters the "not responding" state, Windows is probably no longer indicating to mIRC that the program is active, thus the color change. Loops shorter than 5 seconds don't cause this to happen.

Re: Treebar update [Re: drum] #232693
16/06/11 12:48 PM
16/06/11 12:48 PM
Joined: Jul 2006
Posts: 3,515
France
W
Wims Offline OP
Hoopy frood
Wims  Offline OP
Hoopy frood
W

Joined: Jul 2006
Posts: 3,515
France
Well, it's probably something related but I still think mIRC is doing something wrong: it knows the status window is the active window and it shouldn't color anything in that case.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Treebar update [Re: Wims] #232697
16/06/11 03:57 PM
16/06/11 03:57 PM
Joined: Oct 2004
Posts: 8,327
MA, USA
Riamus2 Offline
Hoopy frood
Riamus2  Offline
Hoopy frood

Joined: Oct 2004
Posts: 8,327
MA, USA
If it IS a Windows thing, then no... mIRC doesn't know the status of the window if Windows doesn't mark it active when it's "Not Responding." I don't know if it's a Windows issue or not, but it definitely sounds right to me. Any time you hang a program, there is a chance of things being done differently while it is hanging. It may be better to find a way around a loop that hangs mIRC. There are usually options to avoid that, depending on what you're doing.

Whether or not this is something that mIRC can "fix," I'm not sure. How will mIRC know the difference if Windows says it's not active while hanging or if Windows says it's not active because you have another window open on top? In one case, you want to mark the events and in the other case, you don't. I'm not sure that you can have both.


Invision Support
#Invision on irc.irchighway.net