Página 1 de 1

Login Gmail [AUTOIT]

Publicado: 05 Mar 2013, 18:29
por DuNeD@i
Propósito; Loguearse automáticamente en gmail desde iexplore
LoginGmail($User, $Pass)

Func LoginGmail($sUsername, $sPassword)
    $sUrl = "https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/ca/&ss=1&scc=1&ltmpl=default&ltmplcache=2"
    $oIE = _IECreate($sUrl, 0, 1, 0, 1)
    Sleep(2500)
    $oHWND = _IEPropertyGet($oIE, "hwnd")
    WinSetState($oHWND, "", @SW_MAXIMIZE)
    $oForm = _IEFormGetCollection($oIE, 0)
    $oUsername = _IEFormElementGetObjByName($oForm, 'Email')
    $oPassword = _IEFormElementGetObjByName($oForm, "Passwd")
    _IEFormElementSetValue($oUsername, $sUsername)
    _IEFormElementSetValue($oPassword, $sPassword)
    _IEFormSubmit($oForm)
EndFunc