Jump to content

IE Page Reload


Amon
 Share

Recommended Posts

Hi out there,

I am writing a simple "Mapper" for a browser game. The script attaches ( _IEAttach )itself to a browser window and reads Map Contents from the HTML Source and stores it for future use.

In the game you change your position by clicking on the map, then a new page is loaded at new coordinates with new mapdata to be read.

And here comes the question:

Is it possible, to get an information:

- if user has clicked something

- if page has reloaded

- ....

from the browserwindow, or do I have to poll the sourcecode all the time?

Best regards

amon

Link to comment
Share on other sites

You could define a function to be called each time the page loads. It's a very nifty thing to do:

$oIE = _IECreate($url, 1)
$oEvent = ObjEvent($oIE, "IEEvent_", "DWebBrowserEvents2")

Func IEEvent_DocumentComplete($pDisp, $url)
    ;your function here
EndFunc

I believe you could also use the NavigateComplete or NavigateComplete2 events. Documentation can be found on MSDN.

IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
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...