Jump to content

IE.au3 Version 3.2 vs 3.3.7.20++ - Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidObjectType


Recommended Posts

This is a bizarre thing. I have around 6000 lines of AutoIt code that was working wonderfully and I was using version 3.2 of IE.au3. A coworker had his AutoIt upgraded to a newer version which has version 3.3.7.20++ and now he can't run the existing code without errors occurring immediately.

I've taken a copy of his IE.au3 and copied into a shared server's common folder from which I am running my .au3 scripts and called it IEnew.au3 and I have my older copy of IE.au3.

I've created a simple snippet of code to demonstrate what I am seeing when I F5 them:

#include "IEnew.au3"

$url = "http://localhost:8082/myapp"

Local $oIE = _IECreate($url)

Local $oForm = _IEFormGetCollection ($oIE, 0)

Local $oQuery = _IEFormElementGetObjByName($oForm, "username")

_IEFormElementSetValue($oQuery, "hello")

When I run that, I get the error:

--> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidObjectType

--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType

Same code, if I change the include to be "IE.au3" and run it again, my textbox is populated successfully.

Is this because I have IE.au3 in C:\Program Files\AutoIt3\Include as well? (I don't have permission to the C:\ files to experiment, would have to contact our systems people so I'd like to know if that's the issue before I do that.)

Link to comment
Share on other sites

I would ber concerned that there are problems with the AutoIt installation on your co-worker's system. There have been changes made to AutoIt that precipitated changes to IE.au3 that would cause that error if you run the new IE.au3 with older AutoIt (just as you are).

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

Link to comment
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
 Share

  • Recently Browsing   0 members

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