Scrolling a window in backgroung

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Marco N
Posts: 16
Joined: 30 Oct 2021, 16:17

Scrolling a window in backgroung

Post by Marco N » 27 Sep 2023, 04:30

I need to scroll a web page to keep it alive. Is it possible to write a simple script to do this stuff?
Thank you.

User avatar
mikeyww
Posts: 27372
Joined: 09 Sep 2014, 18:38

Re: Scrolling a window in backgroung

Post by mikeyww » 27 Sep 2023, 05:10

Although AHK can send keys, there is no guarantee that your Web page will consider them in the same way as manual activity.

Code: Select all

#Requires AutoHotkey v1.1.33
#Persistent
Process Priority,, B
SetTimer scroll, 500

scroll() {
 Static pgDown := False
 Send % (pgDown := !pgDown) ? "{PgDn}" : "{PgUp}"
}

Marco N
Posts: 16
Joined: 30 Oct 2021, 16:17

Re: Scrolling a window in backgroung

Post by Marco N » 27 Sep 2023, 08:43

Thanks for trying but I found some browser extensions that already do this job. I tried one and it seems effective. Anyway, thank you for your help.

Post Reply

Return to “Ask for Help (v1)”