You know - I was wondering how you knew when you've reached the bottom (easy for this smart-ass to say now, isn't it!)
I can think of 3 ways to do this:
(and I've actually used this) is when there's something at the bottom you can recognise. This was easy in my case when scrolling down some web pages and some word processing docs - there was a footer at the bottom that I could detect. If it wasn't detected then I wasn't at the bottom! I suspect you don't have this luxury.
Detect when the scroll bar reaches the bottom. Here's an example of a scroll bar that yet has some way to go:
And this is a long shot specifically for your case: when you click on those circles does something change? Like, for example, a check/tick mark appears in the circle? Or something gets emboldened? If it did then you'd know you couldn't scroll any more when you keep seeing the same thing after trying to scroll further. Maybe the fact that the circles are different colours could be used to indicate an attempt at scrolling didn't do anything since the circle of that last, specific colour is still in the same place?
As I say - I've only ever used the first of these but I don't think that will help you specifically.
Ideally, I'd like this to work for any app that scrolls. The squares and circles thing was something I mocked up in Photoshop to demonstrate the concept; it's not an actual app.
I've seen a few scripts that scroll until the window is displaying the bottom of the document height (I'm probably getting the terminology wrong), so I wonder if a script condition might be the thing. I'm too much of a noob to even investigate that unfortunately. Most of these scripts seem to relate to browsers, but perhaps there's a way.
If the window is AppleScriptable then the scroll bar takes on a range of values from 0 (top) to 1 (bottom) which would be both read/write-able. So, for example, halfway would be 0.5. That’s something you could explore with UI Browser.
I had a look in UI Browser, but it doesn't seem to see the scroll bar. Google didn't throw up anything useful related to getting the current scrollbar position with AS. I have a feeling it would slow things down quite a lot, but I suppose it would be a bit more dependable than found images.