Jump to content

Recommended Posts

Posted

I want to execute an Javascript after same page had been full loaded,

I try using this command

_IEHeadInsertEventScript ($oIE, "document", "onload", "go('info/ring.asp')")

or

_IEHeadInsertEventScript ($oIE, "window", "onload", "go('info/ring.asp')")

or

_IEHeadInsertEventScript ($oIE, "document", "DocumentComplete", "go('info/ring.asp')")

still no one of this working.

If i use event onlick or oncontextmenu or onbeforeunload it will work, but i want this Javascript to start automatically after page was full loaded, can anyone help me or give me an secondary solution?

Posted

You are going to have a difficult time writing to the document before it is complete - by then your horse is already out of the barn.

You should easily be able to initiate the event yourself however:

$oIE.document.fireEvent ("onload")

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Posted

Thank, i will try it.

And i no need especially to write Javascript when pare is still loading, i wanted i trigger after the page was fully loaded not to wait me make click or rightclick.

Thanks for help anyway.

Posted

_IECreate and _IENavigate both call _IELoadWait for you by default, so you do not get control back to your script until the page is fully loaded. You can then act upon it imediately in the next line of code after one of those calls.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Posted

Dale I make with

$oIE = _IECreate ("http://www.homepage.com")

then i want after full page loaded to execute automatically an Javascript, how i make that?

_IEHeadInsertEventScript ($oIE, "document", "", "go('info/ring.asp')")

will not work I have to put an event there, or what command i give for automatic launching that script?

Posted

What is it that you are trying to accomplish?

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

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
  • Recently Browsing   0 members

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