Jump to content

Internet Explorer Automation UDF library


DaleHohm
 Share

Recommended Posts

Im getting this error, what does it mean? I have the IE.au3 in the right folder, because the functions work for other scripts.

C:\Program Files\AutoIt3\beta\Include\IE.au3 (848) : ==> The requested action with this object has failed.:

If IsObj($o_object.elements.item ($s_name, $i_index)) Then

If IsObj($o_object.elements^ ERROR

Link to comment
Share on other sites

Post the portion of your code where you call _IEFormElementGetObjByName

EDIT: and the website too.

#)

Edited by nfwu
Link to comment
Share on other sites

Probably best to start a new thread for this... post some sample code and HTML.

Are there really 11 or more frames in the pagge you are working with?

Dale

Yes, I ran _IEFrameGetCount() and it returned 15 frames. Like I said it is a really crappy web app built by a really crappy company. In any event, I had people manually get me the info via another system, so I don't need to deal with those damn frames. However, I'd still like to learn more about working in the frames, because I have never gotten it to work.
Link to comment
Share on other sites

Please make a habit of including your AutoIt version in any post for help that you make. Also, a simple error message is often not enough to know what is wrong -- please try to include a short sample of code that reproduces your problem.

Without this information, I will guess that you are not running the AutoIt Beta which is required for the COM functions. Please read the important notes at the top of the IE.au2 post.

Dale

Edit: fixed typo

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

Link to comment
Share on other sites

im running autoit v3.1.1.114-beta

here is my code

-----------------

#include <ie.au3>

$oIE = _IECreate()

_IENavigate($oIE, "http://www.suntrust.com")

$o_form = _IEFormElementGetObjByName($oIE, "lform")

$o_login = _IEFormElementGetObjByName($o_form, "in_tx_username")

$o_password = _IEFormElementGetObjByName($o_form, "in_pw_userpass")

_IEFormElementSetValue($o_login, "login here")

_IEFormElementSetValue($o_password, "password here")

_IEFormSubmit($o_form)

Exit

;

this is the error

Line 848 (File "ie.au3"):

If IsObj($o_object.elements.item($s_name, $i_index)) Then

If IsObj($o_object.elements^ERROR

Link to comment
Share on other sites

_IEFormElementGetObjByName needs to have a form object passed to it, not $oIE. You need to do a _IEFormGetObjByName first and use its result in the form element call.

Please look more closely at the examples in reply 3 of this post.

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

thanks for the reply i figured out what i was doing wrong. one more question i have heres my code so far:

#include <ie.au3>

$oIE = _IECreate()

_IENavigate($oIE, "website")

$o_form = _IEFormGetObjByName($oIE, "form")

$o_login = _IEFormElementGetObjByName($o_form, "username")

$o_password = _IEFormElementGetObjByName($o_form, "password")

_IEFormElementSetValue($o_login, "username")

_IEFormElementSetValue($o_password, "pass")

_IEFormSubmit($o_form)

_IELoadWait($oIE)

_IENavigate($oIE, "newwebsite")

Exit

-------------

script runs perfect until i get to the 2nd from last line to browse to another website after i login? is it im to much a noob i didnt do it right?

Link to comment
Share on other sites

thanks for the reply i figured out what i was doing wrong. one more question i have heres my code so far:

#include <ie.au3>

$oIE = _IECreate()

_IENavigate($oIE, "website")

$o_form = _IEFormGetObjByName($oIE, "form")

$o_login = _IEFormElementGetObjByName($o_form, "username")

$o_password = _IEFormElementGetObjByName($o_form, "password")

_IEFormElementSetValue($o_login, "username")

_IEFormElementSetValue($o_password, "pass")

_IEFormSubmit($o_form)

_IELoadWait($oIE)

_IENavigate($oIE, "newwebsite")

Exit

-------------

script runs perfect until i get to the 2nd from last line to browse to another website after i login? is it im to much a noob i didnt do it right?

Assuming "newwebsite" is a URL, your code looks fine.

So this time you included code (this is good), but you did not include an error message or any description of what didn't work and what did happen (this is bad and wastes the valuable time of those trying to help you).

Please post a new thread in the V3 Support forum instead of replying again here -- this thread is too long for working point issues.

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

Hey guys, love the udf but I have a quick question

is it possible to grab the data from the tables(question) and chose an answer for this site:

http://zerocool60544.t35.com/files/test.html

I wnat to make an AI test taker that learns what answers were wrong and retakes the test until it is a perfect score

Thanks

Check out ConsultingJoe.com
Link to comment
Share on other sites

Yes, it is certainly possible.

Please open a new thread in the V3 Support forum to discuss it however as this post is too long to work point issues.

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

Hey guys, love the udf but I have a quick question

is it possible to grab the data from the tables(question) and chose an answer for this site:

http://zerocool60544.t35.com/files/test.html

I wnat to make an AI test taker that learns what answers were wrong and retakes the test until it is a perfect score

Thanks

I looked at your site and it didn't work when I tried to save my answers, but you should be able to read the HTML and write a regex to grep through the HTML to find out of each answer was correct or not. Then you just need to update a db/spreadsheet/text file, etc. for your script to "learn" the correct answer.
Link to comment
Share on other sites

I looked at your site and it didn't work when I tried to save my answers, but you should be able to read the HTML and write a regex to grep through the HTML to find out of each answer was correct or not. Then you just need to update a db/spreadsheet/text file, etc. for your script to "learn" the correct answer.

The site is the result of saving the source from my backboard test. it has the basics. I will start this topic in support. thank you guys
Check out ConsultingJoe.com
Link to comment
Share on other sites

Been trying to figure out how to get the Navigator object to access it's properties, haven't had any luck

maybe you know how DaleHohm?

Yes, the Navigator object is an attribute of a window object. Also interesting to note that the Navigator object is synonymous with the clientInformation object (can you imagine Microsoft having a hard time adopting an object called "Navigator" :) ).

This object is not technically a part of the DOM, but is implemented in both IE and Netscape and gives access to a lot of information closer to the OS and the browser itself. This is why I didn't include it in previous versions of IE.au3, but thinking back on several questions floated recently it would be very useful I think.

#include <IE.au3>
$oIE = _IECreate()
$oWindowNavigator = $oIE.document.parentwindow.navigator
With $oWindowNavigator
    ConsoleWrite(.appCodeName & @CR)
    ConsoleWrite(.appMinorVersion & @CR)
    ConsoleWrite(.appName & @CR)
    ConsoleWrite(.appVersion & @CR)
    ConsoleWrite(.browserLanguage & @CR)
    ConsoleWrite(.cookieEnabled & @CR)
    ConsoleWrite(.cpuClass & @CR)
    ConsoleWrite(.onLine & @CR)
    ConsoleWrite(.platform & @CR)
    ConsoleWrite(.systemLanguage & @CR)
    ConsoleWrite(.userAgent & @CR)
    ConsoleWrite(.userLanguage & @CR)
; this userProfile attribute is just one of many...
    ConsoleWrite(.userProfile.getAttribute("vcard.displayName") & @CR)
    ConsoleWrite(.javaEnabled & @CR)
EndWith

Dale

Edit: this will all be a logical addition to _IEGetProperty() in the next release

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

Link to comment
Share on other sites

Yes, the Navigator object is an attribute of a window object. Also interesting to note that the Navigator object is synonymous with the clientInformation object (can you imagine Microsoft having a hard time adopting an object called "Navigator" :) ).

This object is not technically a part of the DOM, but is implemented in both IE and Netscape and gives access to a lot of information closer to the OS and the browser itself. This is why I didn't include it in previous versions of IE.au3, but thinking back on several questions floated recently it would be very useful I think.

#include <IE.au3>
$oIE = _IECreate()
$oWindowNavigator = $oIE.document.parentwindow.navigator
With $oWindowNavigator
    ConsoleWrite(.appCodeName & @CR)
    ConsoleWrite(.appMinorVersion & @CR)
    ConsoleWrite(.appName & @CR)
    ConsoleWrite(.appVersion & @CR)
    ConsoleWrite(.browserLanguage & @CR)
    ConsoleWrite(.cookieEnabled & @CR)
    ConsoleWrite(.cpuClass & @CR)
    ConsoleWrite(.onLine & @CR)
    ConsoleWrite(.platform & @CR)
    ConsoleWrite(.systemLanguage & @CR)
    ConsoleWrite(.userAgent & @CR)
    ConsoleWrite(.userLanguage & @CR)
; this userProfile attribute is just one of many...
    ConsoleWrite(.userProfile.getAttribute("vcard.displayName") & @CR)
    ConsoleWrite(.javaEnabled & @CR)
EndWith

Dale

Edit: this will all be a logical addition to _IEGetProperty() in the next release

Thanks, think you might find this info of interest http://www.javascriptkit.com/javatutors/navigator.shtml

Gary

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

Speaking of the next release, do you have any idea when it will be ready? I don't want to hurry you, I just love the library and am looking forward to more features.

I had been holding off trying to resolve the _IELoadWait issue and now that I think that may be under control I'm as anxious to see it 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

Hi,

I am new to Autoit, and wanted to do something quick to see if it works.

IE.au3 is just declaring functions, so when I run it, I shouldn't get any errors...right?

Well I get the following errors:

Line 776 (File "C:\------------\IE.au3"):

If IsObj($o_object.elements) Then

If IsObj($o_object.e^ ERROR

Error: Unable to parse line.

Then I saw this:

Important: AutoIt Beta 3.1.1.63 or higher is now required to the use of the ObjName function. Beta downloads are here

Also Important: Download a current version of SciTe (and use the Beta definitions) to get rid of the ObjName error from Au3Check

I have the most recent stable version installed, then I followed the link and installed the beta version. Do I have to do anything extra to enable this beta version? Well I still get the errors when I run IE.au3.

I do not know how to "use beta definitions to get rid of the ObjName error from Au3Check". I guess thats the main problem. Any help would be appreciated!

Thanks,

Brett

Link to comment
Share on other sites

Hi,

I am new to Autoit, and wanted to do something quick to see if it works.

IE.au3 is just declaring functions, so when I run it, I shouldn't get any errors...right?

Well I get the following errors:

Then I saw this:

I have the most recent stable version installed, then I followed the link and installed the beta version. Do I have to do anything extra to enable this beta version? Well I still get the errors when I run IE.au3.

I do not know how to "use beta definitions to get rid of the ObjName error from Au3Check". I guess thats the main problem. Any help would be appreciated!

Thanks,

Brett

I found my problem. I had to enable the beta version.

Disregard this message :)

Brett

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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