Sign in to follow this  
Followers 0
clearguy

Need help for a loop

8 posts in this topic

Hi,

I want to make a loop in this script,i want it to wait until a web site is completely loaded,to see if it's loaded it search a word on this page,but I tryed to make a loop it doesn't work:

$title = "Title - Internet Explorer"

If WinGetText($title,"advanced functions")Then
    MsgBox(0,"info","website loaded")
    
EndIf

This is the code which does'nt work:

$title = "Title - Internet Explorer"
Do
Sleep(200)
Until (WinGetText($title,"advanced functions")) <> 1

If WinGetText WinGetText($title,"advanced functions") Then
    MsgBox(0,"info","website loaded")
    
EndIf

Thanx for help :D

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

You need to look at IE.au3 and IE.au3 Help to use browser options with Internet Explorer.

Edit:

And Beta

Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Thanx that is what I searched for :">

But when I try to use this commande

#include <IE.au3> 
_IELoadWait ( $o_object [, $i_delay = 0 [, $i_timeout = -1]] )

What is the

Object variable of an InternetExplorer.Application

?

I have done that:

include <IE.au3> 
If _IELoadWait("http://www.my_site_to_check.html") Then
    MsgBox(0,"info","Page chargée")
    
EndIf
But when i start it it says

AutoIt Error - Line 261 (File"C:\Program Files\AutoIt3\include\IE.au3")

Case "0"

Error: " Case " statement with no matching "Select" statement

Share this post


Link to post
Share on other sites

it should be

#include <IE.au3> 

_IECreate("http://www.my_site_to_check.html")

the load-wait is built into this command

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Then use IE.au3 to get the source, and do a StringInStr() to see if "advanced functions" is in it.


AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)

Share this post


Link to post
Share on other sites

It is good I had to use the beta version :D

LOL, didn't I put that in my edit 2 hours ago? :D , glad you got it working...

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

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