Sign in to follow this  
Followers 0
onClipEvent

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

4 posts in this topic

#1 ·  Posted (edited)

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
$oIE.visible=1
_IENavigate($oIE,"http://thegame.com/logon.php")
_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



You should familiarize yourself with the forum rules. Any form of game automation is a prohibited topic.

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
    EndIf
WEnd
 
 

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.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


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