Sign in to follow this  
Followers 0
nick448

IE loop help

5 posts in this topic

I need a way to open IE, navigate to a site, scroll down the page, and repeat over and over again..any help would be appreciated, I cannot get While 1...WEnd to work. Keeps giving me Missing WEnd statement error.

Share this post


Link to post
Share on other sites



Post your code. Help someone help you.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

Sorry, here it is..

While 1

#include <IE.au3>

; Create a browser window and navigate to Site

$oIE = _IECreate("http://www.us.trumpf.com")

Send("{F11}")

;make IE Full Screen

Sleep(5000)

;Scrolls Down the Page

MouseClickDrag("left", 1269, 24, 1272, 186, 1)

Sleep(5000)

MouseClickDrag("left", 1272, 186, 1272, 344, 1)

Sleep(5000)

MouseClickDrag("left", 1272, 344, 1272, 644, 1)

Send ("{F11}")

ProcessClose("iexplore.exe")

$PID = ProcessExists("iexplore.exe") ; Will return the PID or 0 if the process isn't found.

If $PID Then ProcessClose($PID)

WEnd

Share this post


Link to post
Share on other sites

Hi nick448,

Move your #include, outside of the loop. Best practice would be to have all your includes at the top of your script, and never in a loop.

Share this post


Link to post
Share on other sites

That worked! Thanks!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0