How to programmatically program a "Wheel Scroll" using Ruby on Windows?
Is there a way to program a "Scroll whee开发者_开发技巧l" turn on the Windows platform using Ruby?
Kind of similar to programming a click on Windows, or a keyboard key press, but this is to program a scroll wheel turn. thanks.
I'm not familiar with Ruby but I can give some hints.
You can do that with the win32 mouse_event function.
// wheel - scroll down
mouse_event(MOUSEEVENTF_WHEEL, 0, 0, -WHEEL_DELTA, NULL);
// wheel - scroll up
mouse_event(MOUSEEVENTF_WHEEL, 0, 0, WHEEL_DELTA, NULL);
Or you can send the WM_MOUSEWHEEL message to the window.
精彩评论