Hotkey to scroll other window without switching to it
I don't know any way to get the second frontmost application or window with AppleScript, apart from something like this:

delay 0.3 -- time to release modifier keys if the script is run with a shortcut
tell application "System Events"
    set p to process 1 where it is frontmost
    set visible of p to false
    delay 0.01
    key code 121 -- 121 = page down, 116 = page up
    set frontmost of p to true
end tell


It makes the hidden and activated windows flash though.

With browsers you could use window.scrollBy():

tell application "Safari" to tell document 1
    do JavaScript "window.scrollBy(0,(window.innerHeight-20))"
end tell

tell application "Google Chrome" to tell active tab of window 1
    execute javascript "window.scrollBy(0,(window.innerHeight-20))"
end tell


Another option would be to simulate pressing ⌃F4, page up or page down, and ⌃⇧F4 by for example using KeyRemap4MacBook:

&lt;autogen&gt;__KeyToKey__ KeyCode::CURSOR_UP, ModifierFlag::FN | ModifierFlag::CONTROL_L | ModifierFlag::NONE, KeyCode::F4, ModifierFlag::CONTROL_L, KeyCode::PAGEUP, KeyCode::F4, ModifierFlag::CONTROL_L | ModifierFlag::SHIFT_L&lt;/autogen&gt;
&lt;autogen&gt;__KeyToKey__ KeyCode::CURSOR_DOWN, ModifierFlag::FN | ModifierFlag::CONTROL_L | ModifierFlag::NONE, KeyCode::F4, ModifierFlag::CONTROL_L, KeyCode::PAGEDOWN, KeyCode::F4, ModifierFlag::CONTROL_L | ModifierFlag::SHIFT_L&lt;/autogen&gt;


It also causes a visual glitch, and ⌃F4 sometimes selects windows from hidden applications.