daten werden nicht ins inputfeld eingetragen (IE funktion)

  • [autoit]

    #include <IE.au3>

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

    $ie = _IeCreate("http://www.google.de",0,1)
    _IeLoadWait($ie)
    $form = _IEFormGetObjByName($ie, "lgpd") ; Keine Ahnug was da genau hin muss :(
    $input = _IeFormElementGetObjbyName($form,"f")
    _IEFormElementSetValue($input,"test")
    _IeFormSubmit($form,1)
    _IeQuit($ie)

    [/autoit]

    Es wird hierbei nichts ins Feld eingetragen

  • So funktionierst bei mir einwandfrei:

    [autoit]

    #include <IE.au3>
    $search= "Dein Suchbegriff hier"
    $oIE = _IECreate ("http://www.google.de")
    _IeLoadWait($oIE)
    $oForm = _IEFormGetObjByName ($oIE, "f")
    $oQuery = _IEFormElementGetObjByName ($oForm, "q")
    _IEFormElementSetValue ($oQuery, $search)
    _IEFormSubmit ($oForm)

    [/autoit]


    MfG eMkay

  • Komisch.. Also dein Fehler war, dass "lgpd" nicht der 'name' des Inputfeldes war, sondern des Google Bildes. Im Quelltext der seite steht, dass "q" der name des Inputs ist und "f" der name des Buttons "Google Suche" ist.

    [autoit]

    #include <IE.au3>
    $ie = _IeCreate("http://www.google.de",0, 1)
    _IeLoadWait($ie)
    $form = _IEFormGetObjByName($ie, "f") ; Keine Ahnug was da genau hin muss :(
    $input = _IeFormElementGetObjbyName($form,"q")
    _IEFormElementSetValue($input,"test")
    _IeFormSubmit($form,1)
    _IeQuit($ie)

    [/autoit]

    Probier es mal so


    MfG eMkay