Sign in to follow this  
Followers 0
SkellySoul

IE Automate Login

7 posts in this topic

Hi Everyone :)

I am having a problem logging into a certain site using the IE functions

The reason I need a auto-login for this site is because I am making a stat collector and that is my only purpose and ill leave it at that ;)

This isn't against the TOS and approved user scripts are allowed, although this is for my own personal use ;)

#include <IE.au3>

$Link = "www.fallensword.com"
$User_Name = "Autoit"
$User_Password = "Password"

$oIE = _IECreate($Link , Default , 1)

$User_Login = _IEGetObjByName($oIE , "Login_Username")
_IEFormElementSetValue($User_Login , $User_Name)
$User_Pass =_IEGetObjByName($oIE , "Login_Password")
_IEFormElementSetValue($User_Pass , $User_Password)
;_IEFormImageClick($oIE , $Login_Link)

Share this post


Link to post
Share on other sites



@SkellySoul

You are around here for some time and I bet you are aware of the forum's rules. Why making such a post?

Nothing good comes from breaking the rules.


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites

@SkellySoul

You are around here for some time and I bet you are aware of the forum's rules. Why making such a post?

Nothing good comes from breaking the rules.

All I am asking for is a automated login and that is all :)

Share this post


Link to post
Share on other sites

I am just dissapointed ... :)


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Try this ( for IE9 try IE8 compatibility mode )

#include <IE.au3>

$User_Name = "Autoit"
$User_Password = "Test"
$oIE = _IECreate("http://www.fallensword.com/index.php?cmd=profile" , Default , 1)

$User_Login = _IEGetObjByName($oIE , "Login_Username")
_IEFormElementSetValue($User_Login , $User_Name)
$User_Pass =_IEGetObjByName($oIE , "Login_Password")
_IEFormElementSetValue($User_Pass , $User_Password)

$oForm = _IEFormGetObjByName ( $oIE, "login-form" )
$o_Button = _IEFormElementGetObjByName ( $oForm, "login-normal-button" )
_IEAction ( $o_Button, "click" )
Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Try this ( for IE9 try IE8 compatibility mode )

#include <IE.au3>

$User_Name = "Autoit"
$User_Password = "Test"
$oIE = _IECreate("http://www.fallensword.com/index.php?cmd=profile" , Default , 1)

$User_Login = _IEGetObjByName($oIE , "Login_Username")
_IEFormElementSetValue($User_Login , $User_Name)
$User_Pass =_IEGetObjByName($oIE , "Login_Password")
_IEFormElementSetValue($User_Pass , $User_Password)

$oForm = _IEFormGetObjByName ( $oIE, "login-form" )
$o_Button = _IEFormElementGetObjByName ( $oForm, "login-normal-button" )
_IEAction ( $o_Button, "click" )

Thanks it works great in compatibility mode but not for IE 9+

Share this post


Link to post
Share on other sites

Just fill your user and password. Here we go. :)

#include <IE.au3>
;#include <_SetIE8.au3>  ; appended at bottom

$Link = "www.fallensword.com"
$User_Name = "Autoit"
$User_Password = "Password"

$oIE = _IECreate($Link , Default , 1)

_setie8($oIE)  ; function made by Forumer100

$User_Login = _IEGetObjByName($oIE , "Login_Username")
_IEFormElementSetValue($User_Login , $User_Name)
$User_Pass =_IEGetObjByName($oIE , "Login_Password")
_IEFormElementSetValue($User_Pass , $User_Password)
$LoginButton =_IEGetObjByName($oIE , "login-normal-button")
_IEAction($LoginButton,"click")

Func _SetIE8($_oIE)  ; by forumer100  -----  Set IE9 to IE8 Browser mode
    If RegRead("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\IEDevTools", "Pinned") Then RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\IEDevTools", "Pinned", "REG_DWORD", 0)
    $hwnd1 = _IEPropertyGet($_oIE, "hwnd")
    $titleOld = _IEPropertyGet($_oIE, "title")
    $titleNew = $titleOld & " " & Random(10000000, 99999999, 1)
    _IEPropertySet($_oIE, "title", $titleNew)
    ControlSend($hwnd1, "", "Internet Explorer_Server1", "{F12}")
    $titleF12 = $titleNew & " - F12"
    WinWait($titleF12, "", 60)
    WinSetState($titleF12, "", @SW_HIDE)
    $hwndF12 = WinGetHandle($titleF12)
    ControlSend($hwndF12, "", "ToolbarWindow321", "{alt}b8")
    Sleep(1000)
    WinClose($hwndF12)
    _IEPropertySet($_oIE, "title", $titleOld)
    WinActivate($hwnd1)
    _IEAction($hwnd1,"refresh")
EndFunc   ;==>_SetIE8

My UDFs, Abbrevs and Snippets
If you like my post, just click the like button :) 

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