how to scroll down

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
questions
Posts: 69
Joined: Wed Apr 23, 2008 9:23 pm

how to scroll down

Post by questions » Wed Mar 23, 2016 9:22 pm

I need the javascript or imacros code to scroll down many pages, how do i do this?
Cobra99
Posts: 64
Joined: Thu Dec 25, 2014 12:17 am

Re: how to scroll down

Post by Cobra99 » Wed Mar 23, 2016 10:03 pm

Try this
URL GOTO=javascript:window.scrollBy(0,5000)
edit the number 5000 to scroll for your needs
VERSION BUILD=8820413 RECORDER=FX, WIN7 64-bit SK, Pale Moon 25.8.1(x86)
FCIM here http://forum.imacros.net/viewtopic.php?f=20&t=3331
questions
Posts: 69
Joined: Wed Apr 23, 2008 9:23 pm

Re: how to scroll down

Post by questions » Wed Mar 23, 2016 11:04 pm

Cobra99 wrote:Try this
URL GOTO=javascript:window.scrollBy(0,5000)
edit the number 5000 to scroll for your needs

your code is incomplete js code that gives an error, but I already have that code in my script and it has no effect on the page anymore, it used to work a year or two ago:



Code: Select all

ret=iimPlay("code:URL GOTO=javascript:window.scrollBy(0,20000000)\nwait seconds=2");
the above is complete code, but it has no effect on actually scrolling down the page
questions
Posts: 69
Joined: Wed Apr 23, 2008 9:23 pm

Re: how to scroll down

Post by questions » Wed Mar 23, 2016 11:11 pm

I've also just tried the expiremental mode with keypressing page down and ctrl+end

simulates ctrl+end keypress:

Code: Select all

EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY" KEY=35 MODIFIERS="ctrl"




simulates page down keypress:

Code: Select all

EVENTS TYPE=KEYPRESS SELECTOR="HTML>BODY" KEYS="[34]"


none of the above works to scroll down, so I'm still looking for a way to scroll down a page
questions
Posts: 69
Joined: Wed Apr 23, 2008 9:23 pm

Re: how to scroll down

Post by questions » Wed Mar 23, 2016 11:12 pm

is there any way to simulate the mouse scroll wheel in imacros for firefox?
chivracq
Posts: 8703
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: how to scroll down

Post by chivracq » Thu Mar 24, 2016 12:17 am

Cobra99's Code works, I use it everyday (since years) and just right now (I have a Script running 24/7 on a 2nd Screen) and it works...

But mention your FCI please when you open a Thread..., I don't do any Digging when FCI is not mentioned...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
sgetgs
Posts: 6
Joined: Wed Mar 23, 2016 12:02 pm

Re: how to scroll down

Post by sgetgs » Thu Mar 24, 2016 11:25 am

put this in your browser console and hit enter

Code: Select all

setInterval(function() { window.scrollTo(0, document.body.scrollHeight); }, 2000);
Post Reply