Project

General

Profile

On MSCROLL » History » Version 5

Per Amundsen, 04/01/2022 03:33 AM

1 1 Per Amundsen
_Added in 2.7_
2
3 5 Per Amundsen
*<notextile>on <level>:MSCROLL:<*#?=@>:<commands></notextile>*
4 1 Per Amundsen
5
Triggers when a user scrolls the message buffer in a window.
6
7 4 Per Amundsen
_See also [[/scrolltext]], [[$window]].mscrollpos, [[$window]].mscrollmax._
8 1 Per Amundsen
9
*Parameters*
10
11 3 Per Amundsen
<level> - The [[User Access Level]] for the event to trigger.
12 1 Per Amundsen
<*#?=!@> - The [[Matchtarget]] to listen to.
13
<commands> - The commands to be performed when the event listener's criteria is met.
14
15
*Example*
16
17
<pre>
18
on *:mscroll:#:{
19 2 Per Amundsen
  if ($window($active).mscrollpos == 1) {
20 1 Per Amundsen
    echo -sg scrollbar for $active is at top
21
  }
22 2 Per Amundsen
  else if ($window($active).mscrollpos == $window($active).mscrollmax) {
23 1 Per Amundsen
    echo -sg scrollbar for $active is at bottom
24
  }
25
}
26
</pre>