Faustvii Posted June 30, 2010 Posted June 30, 2010 Func _AccessAdmin() $oIE = _IECreate("http://127.0.0.1") $oForm = _IEFormGetCollection($oIE, 0) $oUserField = _IEFormElementGetCollection($oForm, 0) $oPassField = _IEFormElementGetCollection($oForm, 1) _IEFormElementSetValue($oUserField, "Username") _IEFormElementSetValue($oPassField, "Password") $LoginCheck = _IEFormSubmit($oForm) If $LoginCheck = -1 Then _IENavigate($oIE, "https://127.0.0.1/admin.htm") Else _IEQuit($oIE) EndIf EndFunc ;==>_AccessAdmin What i want to check is if it successfully login, for instance if the password is wrong it would not login but it seems that the IEFormSubmit still returns -1(success) when the password or username is wrong.
notsure Posted June 30, 2010 Posted June 30, 2010 I always pick a string from the _IEBodyReadHTML function which is unique on the page after you've been logged in succesfully.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now