Jump to content

_IEAction() problem !


Recommended Posts

hello, what's wrong with this script?

It's for loging in facebook, it writes in user&pw then submit

and get the bodytxt to know if "signup" still there or no & to know if the login was successfully or not.

It always says login successfully when it's failed !!

Is there anyway to do it? or to check login succeed?

#include <ie.au3>
#include <file.au3>
$ie = _IECreate("www.facebook.com/login")
_IELoadWait($ie)

$ieform = _IEFormGetCollection($ie, 0)
$ieUser = _IEFormElementGetObjByName($ieform, 'email')
$iePass = _IEFormElementGetObjByName($ieform, 'pass')
_IEFormElementSetValue($ieUser, "test@hotmail.com")
_IEFormElementSetValue($iePass, "password")
$iesubmit = _IEGetObjByName($ie, "login")
_IEAction($iesubmit, "click")
_IELoadWait($ie)
$txtBody = _IEBodyReadText($ie)
$string = StringInStr($txtBody, "signup")
If $string = 0 Then
    MsgBox(0, "", "Login successfully.")
ElseIf $string > 0 Then
    MsgBox(0, "", "Login failed, try again")
    $z = _IEAction($ie, "back") ; here the error comes and it don't back
    If $z = 1 Then MsgBox(0, "", "BACKed") ;; this never get called, whether logged in or not !
EndIf

another problem that the "_IEAction($ie, "back") and _IEActionNavigate() doesn't work with me and gets me this error

"IE.au3 T3.0-1 Error from function _IEAction(back), $_IESTATUS_COMError (-2147352567)"

Edited by Ahmed97
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...