Moin,
ich wollte mittels
[autoit]#include <GUIConstantsEx.au3>
#include <IE.au3>
#include <WindowsConstants.au3>
_IEErrorHandlerRegister()
[/autoit][autoit][/autoit][autoit]$oIE = _IECreateEmbedded()
GUICreate("Test", 1200, 850, 10, 10, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)
$GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, 1024, 768)
$GUI_Button_Start = GUICtrlCreateButton("Start", 10, 10, 50, 30)
ein Windows mit integriertem Internet Explorer Erstellen - klappt prina.
Auch das aufrufen einer Seite ist kein Problem.
Ich will mich jedoch in einem Webformular automatisch anmelden.
Der Quelltext für diese Form ist
<td class="claroRightMenu" valign="top" width="200"><!-- Authentication Form -->
<form class="claroLoginForm" action="/claroline183/claroline/auth/login.php" method="post">
<fieldset style="padding: 7px;">
<legend>Authentifizierung : </legend>
<label for="login">
Benutzername<br>
<input name="login" id="login" size="12" tabindex="1" type="text"><br>
</label>
<label for="password">
Passwort<br>
<input name="password" id="password" size="12" tabindex="2" type="password"><br>
</label>
<input value="Eintreten" name="submitAuth" tabindex="3" type="submit">
</fieldset>
</form>
Alles anzeigen
Hiermit wollte ich mich einloggen.
$o_login = _IEFormElementGetObjByName ($o_form, "login")
$o_password = _IEFormElementGetObjByName ($o_form, "password")
$o_signin = _IEFormElementGetObjByName ($o_form, "submitauth")
_IEFormElementSetValue ($o_login, $username)
_IEFormElementSetValue ($o_password, $password)
_IEAction ($o_signin, "click"
Doch ich schaffe es beim besten Willen nicht, die $o_form des Formulars heraus zubekommen, da es weder Namen noch id hat.
$oForms = _IEFormGetCollection ($oIE)
[/autoit]schafft es mir zwar zu sagen, dass die Seite dieses eine Formular hat, aber ich komme einfach nicht an $o_form.
Danke für eure Hilfe!