

If I do have to activate Chrome in order to scroll, I want PowerShell to become active after I'm done scrolling, without interfering with the scrolling speed. As soon as I add WinActive("PowerShell"), after the line with ControlSend, the scrolling gets slow and choppy. There is a built-in tool in Chrome that can find any harmful software that could be causing your scrolling. Also read: 12 Chrome Flags to Boost Your Browsing. Click on the drop-down menu to the right and choose Disabled. The scrolling is nice and smooth with my code below. Type smooth scrolling, and the option should be highlighted in yellow.

I haven't succeeded in sending the down and up keys to Chrome using ControlSend without first making it active. The idea is to be able to scroll up or down in chrome (scrolling should be fast and smooth when the assigned keys are held down), then have PowerShell be the active window once I'm done scrolling so that I can type into it without having to click back and forth between the windows. I made a script so that I can scroll up or down a webpage open in the active Chrome tab using the RAlt and the Menu Key(AppsKey).

At the moment I'm using the PowerShell console in one half of my screen and Google Chrome on the other.
