使用vbscript自动翻页 [英] automate page scroll using vbscript

查看:105
本文介绍了使用vbscript自动翻页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用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")

但是它不是向下滚动页面,有没有更好的方法可以做到这一点,实际上我不希望向下滚动页面而只向下滚动100个像素,有什么办法吗?

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?

谢谢.

推荐答案

您可以使用

You could use scrollBy over parentWindow.

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

这篇关于使用vbscript自动翻页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆