Jump to content

Recommended Posts

Posted (edited)

Hi.

I am learning IE.au3 and I struggle with this script

#include<IE.au3>
;this script look for input or textarea element which is not type button,hidden,reset or submit and fill with some text
$sURL = "www.google.com"
;$sURL = "web.airdroid.com" does not find any input
$oIE = _IECreate($sURL)

$colForms = _IEFormGetCollection($oIE)
For $oForm In $colForms
    ConsoleWrite("---- FORM " & $oForm.name & " --------------------" & @CRLF)
    $oFormElements = _IEFormElementGetCollection($oForm) ; get all elements
    For $oFormElement In $oFormElements ; loop over element collection
        If StringInStr("input,textarea", $oFormElement.tagName) Then ; it is an input or textarea
            If StringInStr("button,hidden,reset,submit", $oFormElement.type) Then ContinueLoop ; skip to next entry if type is button,hidden,reset,submit (file,password?)
            ConsoleWrite("> input." & $oFormElement.type & " " & $oFormElement.name & @CRLF)
            _IEFormElementSetValue($oFormElement, "Found You", 0) ; set value of the field
        EndIf
    Next
Next

it does work for "www.google.com" but it does not for "web.airdroid.com", any idea?

Przechwytywanie.PNG

Edited by maniootek

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...