Osixs Posted February 1, 2008 Share Posted February 1, 2008 Hello,I have a problem to auto log in on this website.I don't know what enter in " $o_form = _IEFormGetObjByName($oIE, "") "I don't have a "name=" in " <form action="https://e-care.skynet.be/index.cfm?function=connection.getVolume" method="post"> "<form action="https://e-care.skynet.be/index.cfm?function=connection.getVolume" method="post"> <label>Connection login</label> <input type="text" name="form_login" /> (e.g.: fa123456) <br /> <label>Connection password</label> <input type="password" name="form_password" /> <br /> <label></label> <img src="pics/bullet3.gif" /><a href="http://www.belgacom.be/private/en/jsp/dynamic/product.jsp?dcrName=hbs_my_internet" style="color:#002a6a; text-decoration:none">Forgotten your password?</a> <br /><br /> <label></label> <input type="submit" name="Submit2" value="Connect" onclick="hide_buttons();" /> </form>that's the code:#include <IE.au3>$oIE = _IECreate()WinSetState("", "", @SW_MAXIMIZE)_IENavigate($oIE, "https://e-care.skynet.be/index.cfm?function=connection.getVolume")_IELoadWait($oIE)$o_form = _IEFormGetObjByName($oIE, "")$o_login = _IEFormElementGetObjByName($oIE, "form_login")$o_password = _IEFormElementGetObjByName($oIE, "form_password")$oSubmit = _IEFormGetCollection ($oIE, "Submit2")$username = ""$password = ""_IEFormElementSetValue ($o_login, $username)_IEFormElementSetValue ($o_password, $password)_IELoadWait ($oIE)Can you help me please ?Thanks in advance Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 1, 2008 Share Posted February 1, 2008 Hello,I have a problem to auto log in on this website.I don't know what enter in " $o_form = _IEFormGetObjByName($oIE, "") "I don't have a "name=" in " <form action="https://e-care.skynet.be/index.cfm?function=connection.getVolume" method="post"> "that's the code:Can you help me please ?Thanks in advanceUse _IEFormGetCollection() instead. That returns a collection object containing all Forms. Then you walk the collection with a For/In/Next loop. If you know exactly which form it is (i.e. the third form) then you can specify a zero-based index. So the third form would be: $oForm = _IEFormGetCollection($oIE, 2) Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Osixs Posted February 1, 2008 Author Share Posted February 1, 2008 Use _IEFormGetCollection() instead. That returns a collection object containing all Forms. Then you walk the collection with a For/In/Next loop. If you know exactly which form it is (i.e. the third form) then you can specify a zero-based index. So the third form would be: $oForm = _IEFormGetCollection($oIE, 2) thank you very mutch !!! :-)that's worksIt's the code:#include <IE.au3>$oIE = _IECreate()WinSetState("", "", @SW_MAXIMIZE)_IENavigate($oIE, "https://e-care.skynet.be/index.cfm?function=connection.getVolume")_IELoadWait($oIE)$o_form = _IEFormGetCollection($oIE, 1)$o_login = _IEFormElementGetCollection($o_form, 0)$o_password = _IEFormElementGetCollection($o_form, 1)$username = ""$password = ""_IEFormElementSetValue ($o_login, $username)_IEFormElementSetValue ($o_password, $password)_IEFormSubmit ($o_form)_IELoadWait ($oIE) Link to comment Share on other sites More sharing options...
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