Jump to content

The requested action with this object has failed error message in IE.au3


Recommended Posts

Hi,

I am fairly new to Autoit. I am creating a simple login script for Gmail.

I am facing two problems:

1) When I run the script, two instances of IE8 open up, one remains blank, the other opens the gmail page.

2) After this the script closes itself & I get the error message:

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

Local $o_col = $o_object.document.forms.item($s_Name)

Local $o_col = $o_object.document^ ERROR

Any idea where/what am I doing wrong?

Thanks in advance

gmail.au3

Edited by yogendra
Link to comment
Share on other sites

Hi,

2) After this the script closes itself & I get the error message:

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

Local $o_col = $o_object.document.forms.item($s_Name)

Local $o_col = $o_object.document^ ERROR

Any idea where/what am I doing wrong?

Thanks in advance

From help file

_IEFormGetObjByName ( ByRef $o_object, $s_name [, $i_index = 0] )

"gaia_loginform" in your $s_Name is the ID of form and not the name that is why you get that error

Why do you use

_IECreate("www.gmail.com", 0, 1, 0) ?

#include <IE.au3>
$oForm = _IEFormGetCollection (_IECreate ("www.gmail.com"), 0)
_IEFormElementSetValue (_IEFormElementGetCollection ($oForm, 14), "Username")
_IEFormElementSetValue (_IEFormElementGetCollection ($oForm, 15), "Pass")

For "two instances of IE8 open up" i dont get that effect (i cant replicate that error)

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

The attachment that you posted works fine (by itself, anyway) for me. Although, it would work faster if you changed a few things:

#include <IE.au3>
$oIE = _IECreate("www.gmail.com")
$oForm = _IEFormGetObjByName($oIE, "gaia_loginform")
$oUser = _IEFormElementGetObjByName($oForm, "Email")
$oPasswd = _IEFormElementGetObjByName($oForm, "Passwd")
$user = "username"
$passwd = "password"
_IEFormElementSetValue($oUser, $user)
_IEFormElementSetValue($oPasswd, $passwd)
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...