Fehler bei _IEDocReadHtml

10/28/2012 22:26 ExChill#1
Hallo,

Bekomme bei folgendem Code den Fehler
Quote:
--> IE.au3 V2.4-0 Error from function _IELoadWait, $_IEStatus_InvalidDataType
C:\Program Files (x86)\AutoIt3\Include\IE.au3 (2034) : ==> Variable must be of type "Object".:
Return SetError($_IEStatus_Success, 0, $o_object.document.documentElement.outerHTML)
Return SetError($_IEStatus_Success, 0, $o_object.document^ ERROR
Code:
#include <IE.au3>

$ietest = _IECreateEmbedded()

_IEDocWriteHTML ($ietest, '<embed src="http://www.own3d.tv/livestream/2721" type="application/x-shockwave-flash" allowfullscreen="true" width="738" height="415" wmode="transparent"></embed>')

MsgBox (0, "HTML Code", _IEDocReadHTML ($ietest))
Ich hoffe ihr könnt mir helfen :)

MfG ExChill
10/29/2012 18:27 Cholik#2
[Only registered and activated users can see links. Click Here To Register...]

Quote:
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).

There are several properties related to an InternetExplorer object (e.g. returned by _IECreate) that do not apply to this object. These include status text, addressbar and others that may exist for a browser, but do not exist for an embedded control.
Du hast ein embedded Object erstellt was du in keine GUI setzt, du versuchst ins Document Objekt zu schreiben obwohl kein Document Objekt initialisiert wurde.
10/29/2012 21:56 ExChill#3
Eine Gui hab ich natürlich, dachte nur es ist nicht notwendig die auch mit hier reinzuschreiben.
Hat jetzt funktioniert indem ich vor WriteHtml auf "about:blank" gegangen bin.

Vielen Dank für die Hilfe :)
10/30/2012 16:48 Achat#4
Muss du da nicht noch ein Objekt erstellen mit GuiCtrlCreateObj?

MfG
10/30/2012 22:03 ExChill#5
Quote:
Originally Posted by Achat View Post
Muss du da nicht noch ein Objekt erstellen mit GuiCtrlCreateObj?

MfG
Wie gesagt, ich habe es nur nicht mit in den Thread hier geschrieben.
Aber jetzt funktioniert ja alles.
10/31/2012 08:33 Lawliet#6
#closed