SkellySoul Posted July 24, 2011 Posted July 24, 2011 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)
enaiman Posted July 24, 2011 Posted July 24, 2011 @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 :)
SkellySoul Posted July 25, 2011 Author Posted July 25, 2011 @SkellySoulYou 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
enaiman Posted July 25, 2011 Posted July 25, 2011 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 :)
wakillon Posted July 25, 2011 Posted July 25, 2011 (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 July 25, 2011 by wakillon AutoIt 3.3.18.0 X86 - SciTE 5.5.7 - WIN 11 24H2 X64 - Other Examples Scripts
SkellySoul Posted July 26, 2011 Author Posted July 26, 2011 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+
Exit Posted July 26, 2011 Posted July 26, 2011 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 App: Au3toCmd UDF: _SingleScript()
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now