Sign in to follow this  
Followers 0
marcoauto

_iebodywritehtml problem

3 posts in this topic

This is a portion of my script:

Global $oIE_tab3 = _IECreateEmbedded()
Global $hIE_tab3 = GUICtrlCreateObj($oIE_tab3, 120, 190, 312, 228)
_IENavigate($oIE_tab3, @ScriptDir & "\stream.html")
$oIE_tab3.document.body.scroll = "no"
$oIE_tab3.document.body.style.border = "0px"

and the stream.html is

<html>
<div style="position:absolute; top:-15px; left:-10px">
<iframe src="http://192.168.10.3:8081"­ style="zoom:100%" scrolling="no" frameborder="0" width="320" height="240">
        </iframe></div>
</html>

I've tried to use _iebodywritehtml() to write my html code:

$oIE_stream = _IECreateEmbedded()
$sHTML = ""
$sHTML &= "<HTML>" & @CR
$sHTML &= "<HEAD>" & @CR
$sHTML &= "<TITLE>stream</TITLE>" & @CR
$sHTML &= "</HEAD>" & @CR
$sHTML &= "<div style='position:absolute; top:-15px; left:-10px'>" & @CR
$sHTML &= " <iframe src='http://192.168.10.3:8081'­ style='zoom:100%'  scrolling='no' frameborder='0' width='320' height='240'>" & @CR
$sHTML &= "</iframe>" & @CR
$sHTML &= "</div>" & @CR
$sHTML &= "</HTML>"
_IEDocWriteHTML ($oIE_stream, $sHTML)

but it doesn't work.

I'd like to use this function to change te ip address and the port without modify the external html file

Can you help me?

Thanks

marco

Share this post


Link to post
Share on other sites



Please read the helpfile!

Remarks

No actions can be performed on this object until it has been embedded into a parent application (e.g. you cannot perform an _IENavigate). Because of this restriction, the browser is not automatically navigated to 'about:blank' as is a browser created with _IECreate. You must therefore use _IENavigate to navigate this browser to 'about:blank' after it has been embedded into the parent application and before you attempt any operations that rely on having a document loaded (e.g. _IEBodyWriteHTML).

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

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

your html code seems to be bad.

The stream.html file can't be open "manually" in IE...

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
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
Sign in to follow this  
Followers 0