cypher175 Posted April 8, 2009 Share Posted April 8, 2009 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..?? Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 8, 2009 Share Posted April 8, 2009 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...? Perhaps try the _IE_Example() examples? 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 Link to comment Share on other sites More sharing options...
cypher175 Posted April 8, 2009 Author Share Posted April 8, 2009 i just need to get an object reference to a forum that contains checkboxes inside of it, how would i do this..?? Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 8, 2009 Share Posted April 8, 2009 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. 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 Link to comment Share on other sites More sharing options...
cypher175 Posted April 8, 2009 Author Share Posted April 8, 2009 yeah sorry bout that i did mean "FORM" been up for quite a while and zoning out.. 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..?? Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 8, 2009 Share Posted April 8, 2009 (edited) yeah sorry bout that i did mean "FORM" been up for quite a while and zoning out.. 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". Edited April 8, 2009 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 Link to comment Share on other sites More sharing options...
cypher175 Posted April 8, 2009 Author Share Posted April 8, 2009 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 Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 9, 2009 Share Posted April 9, 2009 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 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 Link to comment Share on other sites More sharing options...
cypher175 Posted April 9, 2009 Author Share Posted April 9, 2009 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now