Sign in to follow this  
Followers 0
retghy

New to AutoIT

6 posts in this topic

Hello all, I just found AutoIT yesterday and I've been reading the help files and tutorials big part of the day, but i wonder, where can i find more info on Autoit? Still dont get some things, Is the Online Documentation all u need to master the scripting?

What i want to do is kinda simple, There is this website that i need to access every monday but when too many people access it, it redirects you to other HTML page that says "System is too busy right now, try later", i could spend 2 hours clicking and clicking until i enter but i think AutoIT might save me some time.

How do i get the actual URL that browser is surfing? or how do i read part of the content of the webpage to do some sort of conditional code, If actual webpage contains "System busy try again..." then click the request URL again until i access the real page.

A more detailed example:

link to access: enter.html

System busy: systembusy.html

When the the quote is reached: nomorechance.html

So i have to ideas, 1 is validating the url in the address bar so if URL=systembusy.html then open enter.html again.

Or as i mentioned above, reading someway the HTML code and find the string "System busy" so if webpage contains "system busy" in it, reopen enter.html.

I hope i explained myself, as you may notice english is not my native language :">

If you have any information on this topic i would appreciate it.

Thanks in advanced.

Share this post


Link to post
Share on other sites



if you are using Internet Explorer..

I strongly urge you to learn about IE.au3

this was developed by Dale Hohm

http://www.autoitscript.com/forum/index.ph...ernet+Explorer#

there all kinds of ways of controlling IE

i used it myself

it reads the pages, finds words, pictures etc

sends text, click pics,,,etc

good luck

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Very interesting work by Dale, I find it very usefull, thanks for the reply!

B)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Ok Using what Dale Hohm created i now have this code:

#include <IE.au3>
$ven=_IEattach("windowstitle","title")
_IENavigate($ven,"http://somepage.com")
$tex=_IEBodyReadHTML($ven)
$resul=StringInStr($tex, "some text")
while $resul<>0
HERE I NEED SOMETHING LIKE GOTO LINE 1 BUT GOTO IS NO LONGER AVAILABLE
WEnd

So inside the While when variable $resul<>0 i need the whole process to start over, as i said before I am newbie to AutoIT :S but I've been reading a lot.

The only command that came to my mind was GOTO but now its gone B)

Is there another way to do this?

Thanks in advanced

Edited by retghy

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Try this:

#include <IE.au3>
Do
$ven=_IEattach("windowstitle","title")
_IENavigate($ven,"http://somepage.com")
$tex=_IEBodyReadHTML($ven)
$resul=StringInStr($tex, "some text")
Until $resul<>0
Edit: not being a user of the IE.au3 UDF, I'm not sure that you need to repeat the _IEattach line each time... it is only code... experiment.

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

As far as I see it works, thank you so much, it was so simple :">

Edited by retghy

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