Get Mouse Wheel Scroll usin Win32api in Python
问题 I want to read mouse wheel scroll events and then simulate them. I know I can simulate it using below code. #Scroll one up win32api.mouse_event(MOUSEEVENTF_WHEEL, x, y, 1, 0) #Scroll one down win32api.mouse_event(MOUSEEVENTF_WHEEL, x, y, -1, 0) However, I couldn't find a way to get whell scroll event using win32api in python. Is there anyway to detect wheel scroll up or down events? 回答1: If you need to get the global WM_MOUSEWHEEL message, you can use the SetWindowsHookEx function and with WH