Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a script that sends End key keystroke when i open specific page in Firefox, it scrolls automaticly to the bottom of the page. The problem is that i can't scroll upwards on that page any more. If i press Home or PgUp key or scroll up with the mouse it automaticly scrolls back to the bottom of the page.

This is the script. As example i am using google page:

SetTimer, check , 500

WinGetActiveTitle, OutputVar 
If Instr(Outputvar, "google")
    Send {End}

Any idea how to fix this?

share|improve this question
You could try posting this on stackoverflow.com if you don't get any answers here. –  Toby Allen Dec 15 '13 at 17:19

1 Answer 1

I'm not sure if you already got a working answer on Stack Overflow but if you didn't,
you should really look at GreasyMonkey for this (like MCL said).

The scripts aren't that hard (even easier than AutoHotkey, it's just Javascript) and are really better suited for this task. The following script will scroll down (once) on every https://www.google.com page:

// ==UserScript==
// @name           Scroll google down
// @description    Scrolls down when loading a https://www.google.com page
// @version        1.0.0
// @include        https://www.google.com/*
// ==/UserScript==

window.addEventListener("load", function(e) {
  scroll(0, document.body.scrollHeight);
}, false);
  • The include-line states on which page(s) this script will run.
    You can duplicate this line for more sites.

  • addEventListener("load" will add an onload-event (for after the page is loaded).

  • The scroll does the actual scrolling to the bottom.

In my test the script works correct in Firefox. In Chrome (TamperMonkey) it scrolls just shy of the end (but the "next page"-bit is visible). I think it's because Google does some injecting after the page is loaded, making document.body.scrollHeight just short of the page-height.

So you see, it's actually just one line ;) If you'll look into GreasyMonkey you'll see there are a lot of other cool things you can do with it. Look up some scripts on userscripts.org and you'll see the sources are usually really small.

Of course you can also look on this site with the tag
or on Stack Overflow tag greasemonkey.
You can also get a lot of help here with your scripts if you get stuck.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.