Jump to content

Recommended Posts

  • Replies 100
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Administrators
Posted

Well I have no clue. Been stepping through the code line by line and all functions are returning sucess and end up with the interface GUID of "Interface\{C59C6B12-F6C1-11CF-8835-00A0C911E8B2}" then it goes to look the name of that up from the registry and...well...it doesn't exist...

Posted

I ran this on XPSP3 with IE6 and it returned "dispHTMLDocument" - is that wrong as well?

No, that is what Sven's code has always returned and what is expected.

Here are some of the expected return values for common object types:

"IWebBrowser2"

"IWebBrowser"

"DispHTMLWindow2"

"DispHTMLDocument"

"DispHTMLTable"

"DispHTMLFormElement"

"DispHTMLInputElement"

"DispHTMLSelectElement"

"DispHTMLTextAreaElement"

"DispHTMLElementCollection"

"DispHTMLSelectElement"

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

I ran this on XPSP3 with IE6 and it returned "dispHTMLDocument" - is that wrong as well?

On my WinXP SP3 with IE 8.0 it returned "dispHTMLDocument" too. The same result from Autoit 3.2.12.1 and 3.3.7.7

$oIE = ObjCreate ("InternetExplorer.Application")
$oIE.visible = true
$oIE.navigate("http://www.autoitscript.com")
MsgBox(0,'',"Click When Browser Document Load Complete")
MsgBox(0,'',ObjName($oIE.document))
Posted (edited)

Well I have no clue. Been stepping through the code line by line and all functions are returning sucess and end up with the interface GUID of "Interface\{C59C6B12-F6C1-11CF-8835-00A0C911E8B2}" then it goes to look the name of that up from the registry and...well...it doesn't exist...

I don't know how AutoIt implements this function but if I would have to write it I'd try something like calling GetTypeInfo on passed IDispatch. Then
TypeInfo->GetDocumentation(MEMBERID_NIL, &...
If I do that I get JScriptTypeInfo as a result for the AutoIt code used for testing here. Interesting thing is that {C59C6B12-F6C1-11CF-8835-00A0C911E8B2} (what you say you get) is GUID of JScriptTypeInfo.

//ObjName(IDispatch* object) {

ITypeInfo* pTypeInfo;
BSTR outName;

object->GetTypeInfo(0, 0, &pTypeInfo);
pTypeInfo->GetDocumentation(MEMBERID_NIL, &outName, NULL, NULL, NULL);

//outName to out

Edited by trancexx

♡♡♡

.

eMyvnE

  • Administrators
Posted

Yeah, Trance, that's where I got to as well. Then I've been throwing those return values into all sorts of loops and functions to get something useful out of them, but no luck.

Sven was getting this "disp..." value from the registry - it's just not in there for IE9 anyway. God knows where VBScript is getting it from.

Posted (edited)

If it helps, a regedit search finds DispHTMLDocument at Computer\HKEY_CLASSES_ROOT\Interface\{3050F55F-98B5-11CF-BB82-00AA00BDCE0B}

(on both Win 7, 32-bit, IE9 and XP, IE7)

Dale

Edited by DaleHohm

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

From the typelib probably.

That's unlikely.

What's more possible is that VBS engine doesn't make the same assumptions as AutoIt possibly do.

Maybe it QueryInterface the object for some other interface before IDispatch.

IDispatchEx could be logical choice. Maybe it then calls some specific method of that interface passing magic id to get the name of the object.

Anyway there is nothing that would even remotely indicate that IDispatch is anything else other than what's get (JScriptTypInfo).

♡♡♡

.

eMyvnE

Posted (edited)

This how...

Query passed object for IProvideClassInfo. Then call GetClassInfoW on returned and then GetDocumentation on get TypeInfo with MEMBERID_NIL as index.

That's all.

Edited by trancexx

♡♡♡

.

eMyvnE

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...