Jump to content
Sign in to follow this  

Wait for specific IE page to open, then proceed with script

Recommended Posts


Hi again!

I have a little problem, and I would very much like you to help me.

I'm currently making a bot for a web game (educational purposes, to learn IE.au3).

My challenge is that I want to wait for a specific page to load before starting the script.

For example:

Let's say that I'm currently on "logon.php". I want to wait for the user to finish logging in, then run the script. When the user has logged in, the page "game.php" will load. That's when I want my script to start

To put in in pseudo-code:

#include <IE.au3>

Local $oIE = _IECreate ("about:blank",0,0) 
$oIE.AddressBar = 1 ;
$oIE.MenuBar = 0
$oIE.StatusBar = 0
$oIE.ToolBar = 1
_IELoadWait($oIE, "http://thegame.com/game.php") ;Basically sleep until "game.php" is loaded fully
ConsoleWrite("loaded" & @LF)

Is this possible in Autoit?

Thanks for any help! :)

Edited by onClipEvent

Share this post

Link to post
Share on other sites

I found a solution, but I don't know if it's a good one..

$a = 1
While $a = 1
    $addressbar = ""
    $addressbar = _IEPropertyGet($oIE, "locationurl")
    If $addressbar == "http://thegame.com/game.php" Then
        ConsoleWrite("loaded" & @LF)
        $a = 0

Share this post

Link to post
Share on other sites

Hope you didn't ignore the reply given and will now first read our forumrules with respect to the game automation.


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
Live for the present,
Dream of the future,
Learn from the past.

Share this post

Link to post
Share on other sites
This topic is now closed to further replies.
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.