Jump to content

Populating an input box in IE

Go to solution Solved by karlkar,

Recommended Posts

Hi all,

Just trying to get to grips with the IE UDF but struggling a little :

All I want to do is populate an input box, for example google.  I am looking at the examples and came across "_IEFormSubmit" in the help file; and specifically the example "_IEFormElementGetObjByName".  When I run this example script Google opens but nothing is searched for.  The code is:

#include <IE.au3>

Local $oIE = _IECreate("http://www.google.com")
Local $oForm = _IEFormGetObjByName($oIE, "f")
Local $oQuery = _IEFormElementGetObjByName($oForm, "q")
_IEFormElementSetValue($oQuery, "AutoIt IE.au3")

And the console errors are:

--> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop
--> IE.au3 V2.4-0 Warning from function _IEFormGetObjByName, $_IEStatus_NoMatch
--> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType
--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType
--> IE.au3 V2.4-0 Error from function _IEFormSubmit, $_IEStatus_InvalidDataType

As I say, I am just really getting started with the IE UDF so I'm at a bit of a loss to this, can anyone advise why the example isn't working for me - I haven't changed anything.  And also, does anybody have a simple script that will perform a Google search just to get me started?



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

  • Recently Browsing   0 members

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