Jump to content

Username and Password (GUI)


Rawox
 Share

Recommended Posts

Hey!

I want to make a script that pops up a window where you can fill in your username and password.

Then it needs to go to gmail.com and fills in the information in the username and password field.

This is what I have already:

#include <GUIConstantsEx.au3>

Opt("WinTitleMatchMode", 2); Other Option for WinWaitActive

GUICreate("Title", 260, 260)
GUISetFont(8.5, 800)
GUICtrlCreateLabel("Username", 100, 13)
GUICtrlCreateLabel("Password", 100, 60)
GUISetFont(8.5, 400)

;Button
$input1 = GUICtrlCreateInput("", 10, 29, 240, 20)
$input2 = GUICtrlCreateInput("", 10, 76, 240, 20)
$ok = GUICtrlCreateButton("Ok", 100, 100, 100, 25)

GUISetState(@SW_SHOW)

While 1
    $msg = GUIGetMsg()
    
    Select
       ;------------ OK Button  - Finished
        Case $msg = $ok
        Run ( "C:\Program Files\Mozilla Firefox\firefox.exe" )
        Sleep ( 4000 )
        Send ( "{F6}" )
        Sleep ( 1200 )
        MouseClick ( "left", 1080, 317 )
            #cs
            Run("notepad.exe")
            WinWait("[CLASS:Notepad]")
            $sRead = GUICtrlRead($input1) & @CRLF & GUICtrlRead($input2)
            ControlSetText("[CLASS:Notepad]", "", "Edit1", $sRead)
            #ce
           ;------------ Cross  - Finished
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
    EndSelect
WEnd

Does anyone have any idea?

Link to comment
Share on other sites

Well, im busy on a project last weeks and one part of it was to automate gmail register...

Send me a PM, ill help you :)

AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

CODE

#NoTrayIcon

#include <IE.au3>

#include <EditConstants.au3>

#include <GUIConstantsEx.au3>

$form1 = GUICreate("Title", 260, 180, -1, -1)

GUISetFont(8.5, 800)

GUICtrlCreateLabel("Username", 100, 13)

GUICtrlCreateLabel("Password", 100, 60)

GUISetFont(8.5, 400)

$input1 = GUICtrlCreateInput("", 10, 29, 240, 20)

$input2 = GUICtrlCreateInput("", 10, 76, 240, 20, $ES_PASSWORD)

$ok = GUICtrlCreateButton("Ok", 80, 100, 100, 25)

GUISetState(@SW_SHOW)

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

Case $ok

$oIE = _IECreate("http://www.gmail.com", 0, 1, 1, 1)

$UserName = GUICtrlRead($input1)

$PassWord = GUICtrlRead($input2)

$_UserName = _IEGetObjById($oIE, "Email")

If IsObj($_UserName) Then $_UserName.value = $UserName

$_PassWord = _IEGetObjById($oIE, "Passwd")

If IsObj($_PassWord) Then $_PassWord.value = $PassWord

$submit = _IEGetObjByName($oIE, "signIn")

If IsObj($submit) Then $submit.click

EndSwitch

WEnd

I am not good at English,sorry

Link to comment
Share on other sites

CODE

#NoTrayIcon

#include <IE.au3>

#include <EditConstants.au3>

#include <GUIConstantsEx.au3>

$form1 = GUICreate("Title", 260, 180, -1, -1)

GUISetFont(8.5, 800)

GUICtrlCreateLabel("Username", 100, 13)

GUICtrlCreateLabel("Password", 100, 60)

GUISetFont(8.5, 400)

$input1 = GUICtrlCreateInput("", 10, 29, 240, 20)

$input2 = GUICtrlCreateInput("", 10, 76, 240, 20, $ES_PASSWORD)

$ok = GUICtrlCreateButton("Ok", 80, 100, 100, 25)

GUISetState(@SW_SHOW)

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

Case $ok

$oIE = _IECreate("http://www.gmail.com", 0, 1, 1, 1)

$UserName = GUICtrlRead($input1)

$PassWord = GUICtrlRead($input2)

$_UserName = _IEGetObjById($oIE, "Email")

If IsObj($_UserName) Then $_UserName.value = $UserName

$_PassWord = _IEGetObjById($oIE, "Passwd")

If IsObj($_PassWord) Then $_PassWord.value = $PassWord

$submit = _IEGetObjByName($oIE, "signIn")

If IsObj($submit) Then $submit.click

EndSwitch

WEnd

I am not good at English,sorry

Hey thats awesome i'm trying to do the same thing for myspace i changed the www.gmail.com to www.myspace.com but it didn't seem to fill out the login boxes? any help?

Google Is For Real Men. Yahoo Is For Wimps!

Link to comment
Share on other sites

Hey thats awesome i'm trying to do the same thing for myspace i changed the www.gmail.com to www.myspace.com but it didn't seem to fill out the login boxes? any help?

CODE
While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

Case $ok

$oIE = _IECreate("http://www.myspace.com", 0, 1, 1, 1)

$UserName = GUICtrlRead($input1)

$PassWord = GUICtrlRead($input2)

$_UserName = _IEGetObjById($oIE, "ctl00$cpMain$LoginBox$Email_Textbox")

If IsObj($_UserName) Then $_UserName.value = $UserName

$_PassWord = _IEGetObjById($oIE, "ctl00$cpMain$LoginBox$Password_Textbox")

If IsObj($_PassWord) Then $_PassWord.value = $PassWord

$submit = _IEGetObjByName($oIE, "dlb")

If IsObj($submit) Then $submit.click

EndSwitch

WEnd

Link to comment
Share on other sites

CODE
While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

Case $ok

$oIE = _IECreate("http://www.myspace.com", 0, 1, 1, 1)

$UserName = GUICtrlRead($input1)

$PassWord = GUICtrlRead($input2)

$_UserName = _IEGetObjById($oIE, "ctl00$cpMain$LoginBox$Email_Textbox")

If IsObj($_UserName) Then $_UserName.value = $UserName

$_PassWord = _IEGetObjById($oIE, "ctl00$cpMain$LoginBox$Password_Textbox")

If IsObj($_PassWord) Then $_PassWord.value = $PassWord

$submit = _IEGetObjByName($oIE, "dlb")

If IsObj($submit) Then $submit.click

EndSwitch

WEnd

hey thanks mate looks like it may work but when i run it and click ok with my info it go into myspace like before but it doesnt put my info into the boxes and sign me in?

Google Is For Real Men. Yahoo Is For Wimps!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...