DirectScreen: Scroll lower part of web page into view

Share your tips, tricks and favorite iMacros macros, scripts and applications for web automation in general here.

Moderator: iMacros Moderators

DirectScreen: Scroll lower part of web page into view

by Tech Support on Wed Dec 07, 2005 12:57 pm

Unlike the other HTML-based click commands, DirectScreen operates only on the visible part of a web page (see viewtopic.php?t=300 for details CLICK/DS CLICK comparison). You can use the following command in your macro to scroll the page by an arbitrary amount:

Code: Select all
URL GOTO=javascript:window.scrollBy(0,20000)

Just change the x and y values in the scrollBy method to whatever you need!

You can also use the TAG command to scroll the required part of the web page into view. To do this, simply click on any kind of (HTML) text next to or below the area where you want to send the DirectScreen command to.

Image

The recorded macro looks like this:

http://www.iopus.com/download/forum/win ... croll1.png
VERSION BUILD=5010115
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=http://www.123flashchat.com/
WAIT SECONDS=2
SIZE X=559 Y=465
TAG POS=1 TYPE=FONT ATTR=TXT:Pure<SP>Java<SP>Chat<SP>Server
DS CMD=CLICK X=203 Y=383 CONTENT=
DS CMD=CLICK X=203 Y=383 CONTENT=It<SP>works!
WAIT SECONDS=2

If you play the macro, it opens the web page...
Image

...the TAG command scrolls into the middle of the web page (where the Flash chat applet is)
Image

...and the DS CMD=CLICK command works:
Image

Note: The screenshots contain the WINCLICK command, which was the predecessor of the more powerful DirectScreen Technology. The same technique works for all DirectScreen commands.
User avatar
Tech Support
 
Posts: 5003
Joined: Tue Sep 20, 2005 12:25 pm

Re: DirectScreen: Scroll lower part of web page into view

by blacksheepradio on Sat Aug 23, 2008 10:22 am

i finally got the screen to move and show the button i wanted, but there are 6 similar buttons.
it wants to click the first one and not the one i want which is the 5th.
any suggestions?
blacksheepradio
 
Posts: 2
Joined: Sat Aug 23, 2008 10:11 am

Re: DirectScreen: Scroll lower part of web page into view

by Tech Support on Fri Oct 24, 2008 2:57 am

iMacros V6.3 will support the POS attribute for the IMAGECLICK command, this will solve your issue.
User avatar
Tech Support
 
Posts: 5003
Joined: Tue Sep 20, 2005 12:25 pm


Return to How-To's and useful iMacros: All other topics

Who is online

Users browsing this forum: No registered users and 2 guests

-->