Question

I've gotten it to work by sending it the up/down key and/or page down/up key but I want a more native way to do it, specifically to scroll X amount.

I've tried these:

win32gui.PostMessage(self.find_scrollable(), win32con.WM_MOUSEWHEEL, win32con.WHEEL_DELTA * 3)

win32gui.PostMessage(self.find_scrollable(), win32con.WM_VSCROLL, win32con.SB_LINEDOWN)

Without success.

However these work:

    win32gui.PostMessage(window, win32con.WM_KEYDOWN, key)
    win32gui.PostMessage(window, win32con.WM_KEYUP, key)
Was it helpful?

Solution

You may want to try PyWinauto. It will give you more tools to work with.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top