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.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team
Post Reply
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

DirectScreen: Scroll lower part of web page into view

Post by Tech Support » Wed Dec 07, 2005 7:57 pm

Unlike the other HTML-based click commands, DirectScreen operates only on the visible part of a web page (see http://forum.imacros.net/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.
blacksheepradio
Posts: 2
Joined: Sat Aug 23, 2008 5:11 pm

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

Post by blacksheepradio » Sat Aug 23, 2008 5:22 pm

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?
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

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

Post by Tech Support » Fri Oct 24, 2008 9:57 am

iMacros V6.3 will support the POS attribute for the IMAGECLICK command, this will solve your issue.
Post Reply