Jump to content
Sign in to follow this  
cypher175

How Would I Search For a Forum That Has CheckBoxes In It..?

Recommended Posts

cypher175

Using the _IE Functions, How Would I Search For a Forum that doesn't have a name or an ID in a WebPage That Has CheckBoxes In It, and Then give that forum a Variable Name..??

Share this post


Link to post
Share on other sites
PsaltyDS

Using the _IE Functions, How Would I Search For a Forum that doesn't have a name or an ID in a WebPage That Has CheckBoxes In It, and Then give that forum a Variable Name..??

What...?

:D

Perhaps try the _IE_Example() examples?

:o


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
cypher175

i just need to get an object reference to a forum that contains checkboxes inside of it, how would i do this..??

Share this post


Link to post
Share on other sites
PsaltyDS

i just need to get an object reference to a forum that contains checkboxes inside of it, how would i do this..??

Perhaps you mean "Form" vice "Forum", and then you would use _IEFormGetCollection() with a 0-based index.

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
cypher175

yeah sorry bout that i did mean "FORM" been up for quite a while and zoning out.. :D:o

But there a more than 1 forms on the webpage and there are no names for any of the forms.

So i need to get an object reference to the only form on the page that contains checkboxes inside of it..

is there anyway to do this at all without knowing what the 0-Based Index of the Form is..??

Share this post


Link to post
Share on other sites
PsaltyDS

yeah sorry bout that i did mean "FORM" been up for quite a while and zoning out.. :o:D

But there a more than 1 forms on the webpage and there are no names for any of the forms.

So i need to get an object reference to the only form on the page that contains checkboxes inside of it..

is there anyway to do this at all without knowing what the 0-Based Index of the Form is..??

If you know which form index it is, then just use the 0-based index (i.e. 2 = third form).

Otherwise:

Get the collection of all forms with _IEFormGetCollection() and loop through the forms. For each form, get the collection of "input" tags with _IETagNameGetCollection() and loop through those looking for $oInput.type = "checkbox".

:D

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
cypher175

how do you loop through the collection of "input" tags with _IETagNameGetCollection() and then loop through those looking for $oInput.type = "checkbox"..??

what would the code look like for this...??

this is what i got so far..

$GetForms  = _IEFormGetCollection($IE)
$iNumForms = @extended

For $i = 0 to $iNumForms - 1
    $oForm = _IEFormGetCollection ($IE, $i)
    _IETagNameGetCollection($oForm, "input")

Next

Share this post


Link to post
Share on other sites
PsaltyDS

how do you loop through the collection of "input" tags with _IETagNameGetCollection() and then loop through those looking for $oInput.type = "checkbox"..??

what would the code look like for this...??

this is what i got so far..

$GetForms  = _IEFormGetCollection($IE)
$iNumForms = @extended

For $i = 0 to $iNumForms - 1
    $oForm = _IEFormGetCollection ($IE, $i)
    _IETagNameGetCollection($oForm, "input")

Next
More like this:
$colForms = _IEFormGetCollection($IE)
$iForm = 0
For $oForm In $colForms
    $colInputs = _IETagNameGetCollection($oForm, "input")
    $iInput = 0
    For $oInput In $colInputs
        If $oInput.type = "checkbox" Then
            MsgBox(64, "Found", "Found a check box at:" & @CRLF & _
                    "Form index = " & $iForm & @CRLF & _
                    "Input tag index = " & $iInput)
            ExitLoop 2
        EndIf
        $iInput += 1
    Next
    $iForm += 1
Next

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
cypher175

sweet thanx..

Is there anyway to do this after you find the form with the checkboxes.??

So once it finds the form with checkboxes, it then unticks them all, and if there is an input type of "text" in the form then it fills it in with the website URL and then submits the form...

$colForms = _IEFormGetCollection($IE)
$iForm = 0
For $oForm In $colForms
    $colInputs = _IETagNameGetCollection($oForm, "input")
    $iInput = 0
    For $oInput In $colInputs
        If $oInput.type = "checkbox" Then

               $oInput.checked = False
               If $oInput.type = "text" Then $Input.value = "www.website.com"
               _IEFormSubmit($oForm)

            ExitLoop 2
        EndIf
        $iInput += 1
    Next
    $iForm += 1
Next

Share this post


Link to post
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
Sign in to follow this  

×