Code : Tout sélectionner
#include <IE.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ###
Global $Form2 = GUICreate("Connexion - addmefast.com", 279, 249, 345, 227)
Global $Login = GUICtrlCreateInput("Login", 40, 67, 201, 29)
GUICtrlSetFont(-1, 15, 400, 0, "MS Serif")
GUICtrlSetColor(-1, 0xC0C0C0)
Global $Input1 = GUICtrlCreateInput("Password", 40, 149, 201, 29)
GUICtrlSetFont(-1, 15, 400, 0, "MS Serif")
GUICtrlSetColor(-1, 0xC0C0C0)
Global $Label1 = GUICtrlCreateLabel("Entrez votre Login :", 64, 40, 153, 23)
GUICtrlSetFont(-1, 13, 800, 0, "MS Serif")
GUICtrlSetColor(-1, 0x000000)
Global $Label2 = GUICtrlCreateLabel("Entrez votre Password :", 56, 114, 187, 23)
GUICtrlSetFont(-1, 13, 800, 0, "MS Serif")
GUICtrlSetColor(-1, 0x000000)
Global $Button1 = GUICtrlCreateButton("Connexion", 96, 200, 97, 33)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Local $oIE = _IECreate("www.addmefast.com",0,1,1,1)
Local $oForm = _IEFormElementGetObjByName ( $oIE , "header_form" )
$o1 = _IEFormElementGetObjByName ( $oForm , "email" )
$o2 = _IEFormElementGetObjByName ( $oForm , "password" )
$oValider = _IEFormElementGetObjByName ( $oForm , "login_button" )
$name = GUICtrlRead($Login)
$MDP = GUICtrlRead($Input1)
_IEFormElementSetValue ( $o1 , $name )
_IEFormElementSetValue ( $o2 , $MDP )
_IEAction($oValider, "click")
MsgBox(0,"Information","Vous êtes connecté")
EndSwitch
WEnd