Sign in to follow this  
Followers 0
faustf

automatic login in site

19 posts in this topic

hi guy 

i try  to create a script for  automatic login in site  this is  a  site  www.runner.it

but  not go  i  try to write  this  code 

Global $oIE = _IECreate("http://www.runner.it/static/index.php?err=1",0)

Local $oForm = _IEFormGetObjByName($oIE, "Runner.it")
Local $oText = _IEFormElementGetObjByName($oForm, "login")
_IEFormElementSetValue($oText, "Hey! This works!")

someone  have  somthing  idea??   thankz

Share this post


Link to post
Share on other sites



You've got some of the names incorrect. Try "Login" for the form name and "username" for the element name.

Share this post


Link to post
Share on other sites

yea is  good  thankzzz  alot  :D

Share this post


Link to post
Share on other sites

other  questions  why if i  use  this  dont clik button???

$oButton=_IEGetObjById($oForm,"entra")  
_IEAction ($oButton, "click")

Share this post


Link to post
Share on other sites

not  go :(

Share this post


Link to post
Share on other sites

Instead of just stating that it doesn't work, it would be helpful if you provided a more detailed response. Were there any additional details or error messages given in the Scite output window?

When I run the following, it appears to submit the form as expected:

#include <IE.au3>

Local $oIE, $oForm, $oText

$oIE = _IECreate("http://www.runner.it/static/index.php?err=1",0)

$oForm = _IEFormGetObjByName($oIE, "Login")
$oText = _IEFormElementGetObjByName($oForm, "username")
_IEFormElementSetValue($oText, "demo")

$oText = _IEFormElementGetObjByName($oForm, "password")
_IEFormElementSetValue($oText, "demo")
_IEFormSubmit($oForm)

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

for  me  dont  go  :(

no  remaning  in run  a  program  with demo demo in input box and  explorer opened   but  not  have  error  specific

like  if  you dont  have  this  command 

_IEFormSubmit($oForm)
Edited by faustf

Share this post


Link to post
Share on other sites

Perhaps you are running into the recent issue where an update from MS resulted in lots of broken scripts. You can search the forum to locate details on the specific update.

For more specific advice, you need to provide more details. You have yet to tell us your OS, IE version, Autoit version, etc. Also, run the script in Scite and then post the results from the Output window.

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

You can use _ieaction to click on the 'span', or button, that performs the submit.

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

i use    win 7 ultimate sp1  in virtual box  with ie 11.0.9600.17501

scite Version 1.79 ,autoit v3.3.6.1

 output window is  blank  not  have  error message

Share this post


Link to post
Share on other sites

You are using a very old version of Autoit. Is there a reason that you haven't upgraded to a newer version?

Share this post


Link to post
Share on other sites

because if  go , why change :D  , but  if  problem is  upgrade  i will  try to change  and soon a  tell you result  :)

thankz

for the moment

Share this post


Link to post
Share on other sites

yes  with  new  version the  script  go

i dont  use  new  version for  some  reason

1.  i have  a program big  and long  ,  when i  run in new  version  dont  go (now not remember  the  error )

2.  scite  i dont know  why  ,  when i write 

_IEFormGetObjByName   not  change  color  in blu 

Share this post


Link to post
Share on other sites

Good luck. Maybe someone else will jump in here with some ideas for you.

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

_IEFormGetObjByName go on latest stable and beta version of autoit.
Probably you have some error in writing.

Edit: this works for me

#include <IE.au3>
Local $oIE, $oForm, $oText
$oIE = _IECreate("http://www.runner.it/static/index.php?err=1",0)
$oForm = _IEFormGetObjByName($oIE, "Login")
$oText = _IEFormElementGetObjByName($oForm, "username")
_IEFormElementSetValue($oText, "demo")
$oText = _IEFormElementGetObjByName($oForm, "password")
_IEFormElementSetValue($oText, "demo")
_IEFormSubmit($oForm)
Edited by AutID

Share this post


Link to post
Share on other sites

@AutID, Did you test it With Autoit v3.3.6.1?

Share this post


Link to post
Share on other sites

@AutID, me either. o:) I was just wondering since I had already posted similar code on post 7.

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  
Followers 0