program page up and page down only for excel

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Shekhar Singh
Posts: 115
Joined: 06 Dec 2022, 02:35

program page up and page down only for excel

Post by Shekhar Singh » 06 Feb 2023, 10:22

hi , how can i program page up and page down button only for excel .

Make page down such that it presses control + page down

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

Re: program page up and page down only for excel

Post by mikeyww » 06 Feb 2023, 10:52

Code: Select all

#Requires AutoHotkey v1.1.33
excel := "ahk_exe EXCEL.exe"
#If WinActive(excel)
PgUp::Send ^{PgUp}
PgDn::Send ^{PgDn}
#If

Code: Select all

#Requires AutoHotkey v2.0
excel := "ahk_exe EXCEL.exe"
#HotIf WinActive(excel)
PgUp::Send '^{PgUp}'
PgDn::Send '^{PgDn}'
#HotIf

Post Reply

Return to “Ask for Help (v1)”