'How to simulate mouse scrolling
I am working on a project, I would like help to simulate values in mouse scrolling, a path that I have been researching is this.
Set WX = CreateObject("DynamicWrapperX")
WX.Register "user32.dll", "GetActiveWindow", "r=l"
WX.Register "user32.dll", "PostMessageA", "i=hlll", "f=s", "r=l"
WX.Register "user32.dll", "ShowScrollBar", "i=hlp"
WX.Register "user32.dll", "SetScrollPos", "i=hlll"
WX.ShowScrollBar WX.GetActiveWindow(), 3, "1"
WX.SetScrollPos 0, 1, 100000, 1
WX.PostMessageA WX.GetActiveWindow(), 277, 4 + 65536 * 100, 0
I got something using dynamicwrapperx, but the code creates a new scroll, and that's not what I need
Solution 1:[1]
I don't think VBScript is really the scripting language you want to use to do that. Something like AutoHotKey is probably better suited to that.
AutoHotKey is a lot more flexible when it comes to controlling things on screen in a Windows environment.
https://www.autohotkey.com/docs/commands/Send.htm <-- this one shows you how to send keyboard commands that can potentially control a window's scroll bar. In this case, you'd want to send tabs to move over to the scroll bar (assuming you have an empty Notepad window) and then press the down arrow key.
Please note also, in your VBScript example above, you have misspelled Notepad. That's probably causing you some problems trying get the script to do anything.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Michael Beck |
