Getting position and size of the scroll bar
Posted: 14 May 2017, 07:17
Hi there,
I am currently trying to solve an issue I have with Windows. Whenever you use a scroll bar, there is a limit on how far you can move your mouse until the scrolling gets reset.
I hate Windows for doing this, it is very annoying!
I have already searched the web for useful methods to turn this off, but I don't think there is one.
Instead I now had the idea to simply limit the cursor's movement to the area that is still acceptable (or rather just to the are of the scroll bar itself).
I'd say that half the cake is already done, since I found this script that lets me confine the cursor to an area already!
Now I just need a way to actually get the coordinates of the scroll bar. No, if you want to tell me a method that would get me some sort of percentage of how far I am on the page, that probably doesn't help.
I am thinking of some sort of function that would either • retrieve one coordinate, the top left corner preferably, an then two other values that represent the width and (much more importantly) the height. • or retrieve four coordinates, simply the four corner-coordinates, just like the mouse-confine-script is accepting.
As far as my research within Window Spy goes, the scroll bar isn't always the same width, nor is it even always a window control. I think, this is going to be quite the challenge.
Well, if you have any better ideas or know a method to do this with, please tell me! Of course, if you happen to know a method to just disable the resetting, that would be great too!
Thanks!
I am currently trying to solve an issue I have with Windows. Whenever you use a scroll bar, there is a limit on how far you can move your mouse until the scrolling gets reset.
I hate Windows for doing this, it is very annoying!
I have already searched the web for useful methods to turn this off, but I don't think there is one.
Instead I now had the idea to simply limit the cursor's movement to the area that is still acceptable (or rather just to the are of the scroll bar itself).
I'd say that half the cake is already done, since I found this script that lets me confine the cursor to an area already!
Now I just need a way to actually get the coordinates of the scroll bar. No, if you want to tell me a method that would get me some sort of percentage of how far I am on the page, that probably doesn't help.
I am thinking of some sort of function that would either • retrieve one coordinate, the top left corner preferably, an then two other values that represent the width and (much more importantly) the height. • or retrieve four coordinates, simply the four corner-coordinates, just like the mouse-confine-script is accepting.
As far as my research within Window Spy goes, the scroll bar isn't always the same width, nor is it even always a window control. I think, this is going to be quite the challenge.
Well, if you have any better ideas or know a method to do this with, please tell me! Of course, if you happen to know a method to just disable the resetting, that would be great too!
Thanks!