mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2006
Posts: 4,145
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
Code
dialog testq {
  size -1 -1 200 200
  edit "", 1, 5 5 190 120, read multi vsbar
}
on *:dialog:testq:init:*:var %a 20 | while (%a) { did -a testq 1 line $+ %a $+ $crlf | dec %a } | .timertest 20 1 echo -s $!time

Open the dialog with /dialog -m testq testq and a timer showing the time in status will start.
If you scroll the edit control, the timer stops triggering, which is not expected.
It doesn't happen if you scroll mIRC's window or dialog, only custom dialog.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Jul 2006
Posts: 4,145
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
Sorry for that terrible report.

After testing a bit more, this happens with a list control having a lot of element and a vertical scrollbar, not with an editbox. It also only happens when using mouse wheel (or possibly it's way more visible with mouse wheel)

Execute /scrollbug and scroll the list control with the mouse wheel:

Code
alias scrollbug window -pdfo @scrollbug -1 -1 200 200 | dialog -mo testq testq | scrollbug1
alias scrollbug1 var %a 100 | while (%a) { drawrect -fr @scrollbug $r(1,16777215) 0 0 0 200 200 | dec %a } | .timerscrollbug -h 1 0 scrollbug1
on *:close:@scrollbug:.timerscrollbug off | if ($dialog(testq)) dialog -x testq
dialog testq {
  size -1 -1 200 200
  list 1, 5 5 100 160, vsbar
}
on *:dialog:testq:init:*:var %a 20 | while (%a) { did -a testq 1 line $+ %a | dec %a }
on *:dialog:testq:close:*:.timerscrollbug off | window -c @scrollbug
When you use the mouse wheel to scroll the list control in the dialog, the @scrollbug window will stop displaying a random color for a while, with a very long list and depending on the code executed by the timers and other factors, you can end up with no triggering at all.
I'm on windows 7, mouse is logitech M235 and is set up to scroll 3 lines for mouse wheel.

Last edited by Wims; 25/10/21 01:36 PM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 5,412
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,412
Thanks for your bug report. If you are referring to the timer slowing down when other windows messages are being received, this is expected behaviour. The /timer command is based on windows timer messages, which are low priority messages. If you are scrolling in a window, mIRC will receive multiple windows messages, prior to receiving any pending timer messages. Only when all other messages have been processed will timer messages be received and processed.

Joined: Jul 2006
Posts: 4,145
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
Thanks for the answer, I understand timers don't have high priority but the difference in behavior when you scroll without the mouse wheel is still strange.
It's like there a large amount of windows messages with mouse wheel compared to normal scrolling.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 5,412
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,412
When I test this here, if my mouse wheel scrolls one click, the listbox scrolls by three lines, which is the system setting. The timer pauses visibly until the listbox scrolling completes and then continues. mIRC does not handle the mouse wheel messages in this case or the scrolling of the listbox - this is handled by the mouse driver which sends scroll messages to the control directly.


Link Copied to Clipboard