Jump to content

Problem auto log in with _IEFormGetObjByName


Osixs
 Share

Recommended Posts

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

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 advance

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)

:)

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

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 works

It'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

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...