HADE Posted March 1, 2019 Author Share Posted March 1, 2019 Just now, rm4453 said: ;===CREDIT=========================== ; ; URL TO SOURCE: https://www.autoitscript.com/forum/topic/136542-ie-automation-get-all-input-fields-and-set-values/ ; CREDIT FOR CODE TO: Robjong ; ;==================================== #include<IE.au3> $sURL = "http://yahoo.com" $oIE = _IECreate($sURL, 0, 1, 1, 1) $colForms = _IEFormGetCollection($oIE) ; get all forms For $oForm In $colForms ; loop over form collection ConsoleWrite("---- FORM " & $oForm.name & " --------------------" & @CRLF) $oFormElements = _IEFormElementGetCollection($oForm) ; get all elements For $oFormElement In $oFormElements ; loop over element collection If StringLower($oFormElement.tagName) == 'input' Then ; it is an input ConsoleWrite("> input." & $oFormElement.type & " " & $oFormElement.name & @CRLF) _IEFormElementSetValue($oFormElement, "Found You", 0) ; set value of the field ElseIf StringLower($oFormElement.tagName) == 'textarea' Then ; it is a textarea ConsoleWrite("> textarea " & $oFormElement.name & @CRLF) _IEFormElementSetValue($oFormElement, "Found You", 0) ; set value of the field EndIf Next Next input.text 62896125e9c95c Link to comment Share on other sites More sharing options...
rm4453 Posted March 1, 2019 Share Posted March 1, 2019 That code is your solution, you should be able to adapt it. 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