VBScript code for Scrolling

Can any tell me what is the script for scrolling on any browser from top to bottom and viceversa using VBscript?

Showing Answers 1 - 2 of 2 Answers

sri_yarley

  • Jul 27th, 2011
 

You can try one of the following:

Set Obj=Browser("browsername").Page("Pagename").Object.body
Obj.doScroll("pageUp")

Or

'for page down

Set objShell=CreateObject("WScript.Shell")
objShell.SendKeys "{PGDN}"

'for page up

Set objShell=CreateObject("WScript.Shell")
objShell.SendKeys "{PGUP}"

  Was this answer useful?  Yes

sri_yarley

  • Jul 27th, 2011
 

There are couple of ways for doing this.

Code
  1.  

  2.  

  3. 'For page up

  4. "browsername").Page("pagename""pageUp")

  5.  

  6. 'For page down

  7. "browsername").Page("pagename""pageDown"'For page up

  8. "WScript.Shell""{PGUP}"

  9.  

  10. 'For page down

  11. "WScript.Shell""{PGDN}"

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions