Jump to content

_IEAction not working


Recommended Posts

Hello.

 

Website code:

<span class="button_middle">Acesso</span>

My code:

Local $button = _IEGetObjByName ($oIE, "Acesso")
_IEAction($button , "Click")
 
 
I'm trying to make it click on the button but it isn't working. Any help pls? :)
Link to comment
Share on other sites

I'm going to explain better what i'm trying to do.

My Script:

#include <IE.au3>

call ("Autologin")
Login()
Func Login()
Global $oIE = _IECreate ("http://www.EXAMPLE.com")
$iVisible = 0

Local $user = _IEGetObjByName ($oIE, "user")
Local $password = _IEGetObjByName ($oIE, "password")


_IEFormElementSetValue($user, "USERNAME")
_IEFormElementSetValue($password, "PASSWORD")


EndFunc

I'm trying to create a auto login. My problem is that the login button doesn't have any id or name, so i can't use _IEGetObjByName, the website code for that button is:

<span class="button_middle">Acesso</span>

Can anyone help me pls? :) thank you

Link to comment
Share on other sites

You are using this tutorial isn't? 

 

 

Better ideea is to look at this post,could be very helpful to create a autologin with post request:

'?do=embed' frameborder='0' data-embedContent>>

Or :

$sPD = "data to be send" ; this data must be something like a cookie(use http headers to find out how to use it)
$server "www.example.com"

; Creating the object
$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP.Open("POST", $server, False)
$oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")

; Performing the Request
$oHTTP.Send($sPD)

; Download the body response if any and get the server status response code
$oReceived = $oHTTP.ResponseText
$oStatusCode = $oHTTP.Status

; This depend of your server response code,could be any error code
If ($oStatusCode <> 200) then
 MsgBox(4096, "Response code", $oStatusCode)
EndIf
Edited by DocTorCoder

DocTorCoder

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