Jump to content

Recommended Posts

So I have tested a bit of code that allows me to store login and password information and use it later on to login.

See Code below

Func LoginInfo()
    Local $User, $Password
Local $btn, $msg
Global $Usr, $Pwd
   GUICreate(" User Name and Password for ESQ", 320, 120, @DesktopWidth / 2 - 160, @DesktopHeight / 2 - 45, -1)
   $User = GUICtrlCreateInput("", 10, 5, 300, 20)
   $Password = GUICtrlCreateInput("", 10, 35, 300, 20,0x0020)
   $btn = GUICtrlCreateButton("Ok", 40, 75, 60, 20)
   $msg = 0
  While $msg <> $GUI_EVENT_CLOSE
        $msg = GUIGetMsg()
            Case $msg = $btn
   $Usr = GUICtrlRead($User)
   $Pwd = GUICtrlRead($Password)
    ;MsgBox(4096, "User and Password", GUICtrlRead($User))

#include <IE.au3>
MsgBox(4096, "User and Password", $Usr)
$URL = "https://google.com"
$IE = _IECreate($URL, 0, 0, 0)
$HWND = _IEPropertyGet($IE, "hwnd")
_IEAction($IE, "visible")

Once I use this working code in my larger program it fails. It won't store the login and password information, nor will it wait for rest of the program until the login information is entered.

What am I doing wrong?

Link to post
Share on other sites

i am soory but pls reread our Forum Rules

SPAM tools including instant messenger or forum auto-posters. This includes forum or site auto-login methods.

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)

There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

Link to post
Share on other sites

Please ignore the first responder. There are plenty of reasons to use automated logins. Let me find some of the methods posted by MVPs here that I have used.

;~ #1: this one works well
#include <IE.au3>
$URL = "yoururlhere.com"
$ObjIE = ObjCreate("InternetExplorer.Application")
With $ObjIE;Wait until Forwarding Website loads
.Visible = True
.Navigate ($URL)
Until .ReadyState = 4
With $ObjIE.document.forms (0);Set Form Objects on Website
.username.value = "Usernamehere"
.password.value = "Passwordhere"
;~ End #1: this one works well

;~ #2: this one works better
_IENavigate ($oIE, "YourURLHere.com") ; Fill out a page and submit
_IELoadWait ($oIE)
$oForms1 = _IEFormGetObjByName($oIE, "NameOfFormHere")          
$oNum1 = _IEFormElementGetObjByName($oForms1, "NameOfemailField")  
$oNum2 = _IEFormElementGetObjByName($oForms1, "NameOfPasswordField")  
$Email = ""
$Password = ""                
_IEFormElementSetValue($oNum1, $Email)  
_IEFormElementSetValue($oNum2, $Password)   
_IEFormSubmit($oForms1)       ; Sumbit
;~ #2: this one works better
Edited by John117
Link to post
Share on other sites

Please ignore the first responder.

Oh no you didn't. Advocating ignoring somebody who is parroting the rules I helped create and posted means you are advocating ignoring me. In general that is not a good idea. You have a couple days to think about that.

There are plenty of reasons to use automated logins.

Indeed there are. There are plenty of legitimate reasons to do a lot of things that break rules and laws. That does not mean we discard the rules on a whim, however. The rules are what they are. Right/wrong, agree/disagree they are clearly posted and known to be enforced so people need to either deal with them and work within their constraints or find another forum.

Thread locked and as mentioned, John117 banned for a couple days to think about rules and why ignoring them (and me) is a bad idea.

Link to post
Share on other sites

I just noticed John117 has been reprimanded no less than 3 times by me within a 3 week period at the end of 2007 through early 2008. Making a note here: Huge Success. No wait, making a note that the next time will be permanent removal.

Link to post
Share on other sites
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By izmegna
      I am trying to auto login to web app that has the following HTML for the username, password and submit button:
      <input name="usernameField" tabindex="0" class="inp" id="usernameField" type="text" value="" message="FND_SSO_USER_NAME">
      <input name="passwordField" tabindex="0" class="inp" id="passwordField" type="password" value="" message="FND_SSO_PASSWORD">
      <button tabindex="0" class="OraButton left" style="padding-right: 6px; padding-left: 6px;" onclick="submitCredentials()" message="FND_SSO_LOGIN">Log In</button>
      Following is the AutoIT script I am using I am passing the username and password via cmd but it is not working, any suggestion?
      #include <IE.au3>
      Local $url ="https://www.Intra.edwa.com"
      Local $oIE =_IECreate($url)
      Local $oUser =_IEGetObjById($oIE,"usernameField")
      Local $oPass =_IEGetObjById($oIE,"passwordField")
      _IEFormElementSetValue($oUser, $CmdLine[1])
      _IEFormElementSetValue($oPass, $CmdLine[2])
      $oLinks = _IETagNameGetCollection($oIE, "input")
      For $oLink In $oLinks
          If String($oLink.type) = "submit" And String($oLink.value) = "Sign In" Then
                _IEAction($oLink, "click")
    • By triple_N
      Hi, I'm not sure why my code suddenly breakage as previously this function was okay. But I do the re-test I found that my password field saved the input with added 3 for each character input. 
      Example the input saved supposed "12345678901234567890" but it become "1323334353637383930313233343536373839303". 
      This is my code;
      $input_password = GUICtrlCreateInput($a_password, 175, 165, 150, 18, $ES_PASSWORD) GUICtrlSetLimit($input_password,-1, 20) Local $hPW = GUICtrlGetHandle($input_password) Local $hToolTip2 = _GUIToolTip_Create(0) ; default style tooltip _GUIToolTip_AddTool($hToolTip2, 0, 'Maximum 20 characters only.' , $hPW) Have anyone know what had happen?
    • By XGamerGuide
      I'm trying to assign a faint text in the background to an input field that disappears after the input has started. This should have a certain color such as gray.
    • By hek
      Hey everyone,
      Was wondering how I would be able to implement this on a local computer instead of using connectserver? 
      Any suggestions or help would be appreciated. Thanks. 
    • By Stormgrade
      I'm french, sorry for my english.
      I release my project, a password manager : Password Keeper
      First I would like to thanks Guinness and Melba23 for their help, and I'm very sorry for those I forget, please remind me to add you.
      Well my program manage and crypt passwords, first I understand if you don't trust me for this kind of sensible software, but I remember you that all the the source files are at your disposal, fell free to explore them.
      The login is : admin and you can change it later
      How it work ? see Methode de cryptage en BDD.pdf in french

      The main interface
      You can obviously add,modify and delete your entry, also you can search with keywords

      A password generator is included

      I won't update it anymore.
      It's a BSD license.
      Autoit version :
      Have a good day.
      Methode de cryptage en BDD.pdf Passwordkeeper.7z
  • Create New...