Miau 0 Posted October 20, 2007 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? Share this post Link to post Share on other sites
DaleHohm 65 Posted October 20, 2007 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, curlMSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object modelAutomate input type=file (Related)Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better?IE.au3 issues with Vista - WorkaroundsSciTe 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 Share this post Link to post Share on other sites
Miau 0 Posted October 20, 2007 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. Share this post Link to post Share on other sites
DaleHohm 65 Posted October 21, 2007 _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, curlMSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object modelAutomate input type=file (Related)Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better?IE.au3 issues with Vista - WorkaroundsSciTe 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 Share this post Link to post Share on other sites
Miau 0 Posted October 23, 2007 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? Share this post Link to post Share on other sites
DaleHohm 65 Posted October 23, 2007 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, curlMSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object modelAutomate input type=file (Related)Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better?IE.au3 issues with Vista - WorkaroundsSciTe 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 Share this post Link to post Share on other sites