form elemente

  • halloff ihr lieben ich dreh mich grade im kreis
    mit folgen skriptl lese ich die form und elemente aus

    Spoiler anzeigen
    [autoit]

    #include <IE.au3>

    [/autoit] [autoit][/autoit] [autoit]

    $Url = 'www.web.de' ;google.de
    $formname='fm' ;bei google f
    $oIE=_IECreate($Url)
    $oForms = _IEFormGetCollection ($oIE)
    $iNumForms = @extended
    If @error Then
    MsgBox(0, '', 'Keine Formen enthalten')
    Else
    $Index = 0
    For $oForm In $oForms
    ConsoleWrite('Form-Index: ' & $Index & ' / Name: ' & $oForm.Name & @CRLF)
    $Index += 1

    [/autoit] [autoit][/autoit] [autoit]

    Next
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    $oFormular = _IEFormGetObjByName($oIE, $formname)

    [/autoit] [autoit][/autoit] [autoit]

    For $oElement In $oFormular.Elements

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;FileWrite($test,$oElement.Type & ' ' & $oElement.Name & @CRLF)
    ConsoleWrite('elmenttupe/ '& $oElement.Type & '/elmentname ' & $oElement.Name & @CRLF)
    next

    [/autoit]


    bei google klappt es bei web.de nicht aber wieso
    fehlermeldung
    Form-Index: 1 / Name: fm
    Form-Index: 2 / Name: 0
    Form-Index: 3 / Name: 0
    Form-Index: 4 / Name:
    D:\9.10testformlelement.au3 (26) : ==> The requested action with this object has failed.:
    ConsoleWrite('elmenttupe/ '& $oElement.Type & '/elmentname ' & $oElement.Name & @CRLF)
    ConsoleWrite('elmenttupe/ '& $oElement.Type ^ ERROR
    hat einer ne idee wieso

    2 Mal editiert, zuletzt von rewejo (11. Oktober 2010 um 19:07)

  • dito

    [autoit]

    #include <IE.au3>

    [/autoit][autoit][/autoit][autoit]

    $Url = 'www.google.de' ;google.de
    $formname='f' ;bei google f
    $oIE=_IECreate($Url)
    $oForms = _IEFormGetCollection ($oIE)
    $iNumForms = @extended
    If @error Then
    MsgBox(0, '', 'Keine Formen enthalten')
    Else
    $Index = 0
    For $oForm In $oForms
    ConsoleWrite('Form-Index: ' & $Index & ' / Name: ' & $oForm.Name & @CRLF)
    $Index += 1

    [/autoit][autoit][/autoit][autoit]

    Next
    EndIf

    [/autoit][autoit][/autoit][autoit]

    $oFormular = _IEFormGetObjByName($oIE, $formname)

    [/autoit][autoit][/autoit][autoit]

    For $oElement In $oFormular.Elements

    [/autoit][autoit][/autoit][autoit][/autoit][autoit]

    ;FileWrite($test,$oElement.Type & ' ' & $oElement.Name & @CRLF)
    ConsoleWrite('elmenttupe/ '& $oElement.Type & '/elmentname ' & $oElement.Name & @CRLF)
    next

    [/autoit][autoit][/autoit][autoit][/autoit]


    Funktioniert.