Jump to content

Recommended Posts

Posted

i need to fill out a form but it doesnt have a name

<form action="addlink.php" method="post" onsubmit="return submit_link()">

when using the ie form selector

$oForm = _IEFormGetObjByName ($oIE, "ExampleForm")
$oSelect = _IEFormElementGetObjByName ($oForm, "selectExample")

do i have to have the object to be able to select the the form element?

it is the only form on the page

Posted

sorry this was a slight cockup on my part.

I ahve looked through the examples and it says there are 6 forms on the page

#include <IE.au3>
  

 $oIE = _IECreate ("http://www.thetattooforum.com/Tattoo_directory/addlink.php?c=0")
   $oForms = _IEFormGetCollection ($oIE)
   $iNumForms = @extended
   MsgBox(0, "Forms Info", "There are " & $iNumForms & " forms on this page")
   For $i = 0 to $iNumForms - 1
    $oForm = _IEFormGetCollection ($oIE, $i)
    MsgBox(0, "Form Info", $oForm.name)
   Next

although it then displays some information about each form which basically consists of it saying 0 6 times

I have tried playing with the other ieformgetcollection examples which use google but i cant really get what i should be doing. as at leats one of them doesnt seem to work on google now.

this

#include <IE.au3>
$oIE = _IECreate ("http://www.google.com")
$oForm = _IEFormGetCollection ($oIE, 0)
$oQuery = _IEFormElementGetCollection ($oForm, 1)
_IEFormElementSetValue ($oQuery, "AutoIt IE.au3")
_IEFormSubmit ($oForm)

doesnt seem to work anymore.

however. if i am to edit the above script to hopefully get some action out of it.

is it just the

$oForm = _IEFormGetCollection ($oIE, 0)
line which i should edit the index on the end to 1 2 3 4 until it fills the form i want it to fill?

i dont totally understan the

$oQuery = _IEFormElementGetCollection ($oForm, 1)
line either.

sorry for newbness pls help

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...