Jump to content
Sign in to follow this  

_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")

$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")
$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 !

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

Share this post

Link to post
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
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.