Jump to content

Recommended Posts

Posted

The script below is my effort to search for something on ebay. "dell notebook"

The 1st section with msgbox is just to give me the form name. ie. "headerSearch"

I never see the "dell notebook" in the ebay search field... WHAT am I doing wrong???

************************************

#include <IE.au3>

$Search = "dell notebook"

$oIE = _IECreate("http://www.ebay.com/")

_IELoadWait ($oIE)

$oForm = _IEFormGetCollection ($oIE, 0)

$oForms = _IEFormGetCollection ($oIE)

MsgBox(0, "Forms Info", "There are " & @extended & " forms on this page")

For $oForm In $oForms

MsgBox(0, "Form Info", $oForm.name)

Next

$oForm = _IEFormGetCollection ($oIE, 0)

$oQuery = _IEFormElementGetObjByName ($oForm, "headerSearch")

_IEFormElementSetValue ($oQuery, $Search)

_IEFormSubmit($oForm)

_IELoadWait ($oIE)

  • 1 month later...
Posted (edited)

try

#include <IE.au3>
 
 $Search = "dell notebook"
 
 $oIE = _IECreate("http://www.ebay.com/")
 _IELoadWait ($oIE)
 $oForm = _IEFormGetCollection ($oIE, 0)
 
 $oForms = _IEFormGetCollection ($oIE)
 For $oForm In $oForms
 Next
 
 $oForm2 = _IEFormGetCollection ($oIE, 0)
 
 $oSubmi = _IEGetObjByName ($oIE, "headerSearch")
 BlockInput(1)
 ControlSend($oSubmi, "", "", $search)
 BlockInput(0)
 _IEFormSubmit($oForm2)
 _IELoadWait ($oIE)
Edited by bluerein

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
×
×
  • Create New...