Jump to content

New to AutoIT


retghy
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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]

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...