Jump to content
Sign in to follow this  
faustf

automatic login in site

Recommended Posts

faustf

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
faustf

yea is  good  thankzzz  alot  :D

Share this post


Link to post
Share on other sites
Danp2

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
faustf

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
Danp2

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
jdelaney

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
faustf

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
faustf

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
faustf

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
AutID

_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

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  

×