codeomnitrix
codeomnitrix

Reputation: 4249

automate page scroll using vbscript

I need to take complete snapshot of a page using vbscript, and to do this I need to scroll a bit down. Actually I am able to take half of the page in snapshot but I need to take the remaining part also in the next snapshot.

I tried using following once the page is loaded

ie.document.body.doScroll("pageDown")

But it is not scrolling the page down, is there any better way to do this, Actually I don't want to have a page down scroll but just 100 pixels down, Is there any way to do that?

Thanks in advance.

Upvotes: 5

Views: 11794

Answers (2)

Jason Ebersey
Jason Ebersey

Reputation: 647

Simply use this: Window.Scroll x, y

Window.Scroll 0, 0

Upvotes: 0

Kul-Tigin
Kul-Tigin

Reputation: 16950

You could use scrollBy over parentWindow.

ie.Document.parentWindow.scrollBy 0, 100
'as relative new.x = current.x + (0), new.y = current.y + (100)

Upvotes: 3

Related Questions