$window() .scrollstart and .scrollend would be a similar idea but with a little more functionality. You could test if $window(#chan).scrollend == $line(#chan,0), but you could also do some other neat scroll related things with it (eg. a script to copy only the active lines in a window to the clipboard). Perhaps an associated command to set the scrollbar would be useful too (bind extra keys to scrolling, would also allow for custom window search scripts!).