Jump to content
Sign in to follow this  
Cryslacks

Email login script

Recommended Posts

Cryslacks

Okey Guys i really need help with this script! Okey i will explain the script.

It will open a gui (i have made the gui i dont need help with it) and you type your email and your passwords in two inputs and you press a button and it wil type that in to hotmail.com and log in that account!

This is how far i got with the script!

I need a command like %(input or key)% that exist in batch.

------------------------------------------------------------------------------------------------------------------------------------------------------------------

#include <GUIConstantsEx.au3>

#include <IE.au3>

 

Example()

Func Example()

    Local $Edit_1, $msg, $EnterPassLabel, $Edit_2, $EnterUserLabel, $Edit_3

Opt("GUICoordMode", 2)

GUICreate("Hotmail", 315, 150, 192, 124) ; will create a dialog box that when displayed is centered

GUISetBkColor(0xCC0000)

$EnterPassLabel = GUICtrlCreateLabel ( "Insert Email: ", 5, 25, 86, 12)

$Edit_1 = GUICtrlCreateEdit("Email", -3, -15,125,18)

$EnterUserLabel = GUICtrlCreateLabel ( "Insert Password: ", -208, 25, 86, 12)

$Edit_3 = GUICtrlCreateEdit("Password", -3, -15,125,18)

$Edit_2 = GUICtrlCreatebutton( "Hotmail!",-110,15,81,26)

 

    GUISetState() ; will display an  dialog box with 2 button

 

    ; Run the GUI until the dialog is closed

    While 1

        $msg = GUIGetMsg()

        Select

            Case $msg = $GUI_EVENT_CLOSE

                ExitLoop

            Case $msg = $Edit_2

Call ("SignIn")

        EndSelect

    WEnd

EndFunc

 

Func SignIn ()

 

Local $oIE,$username,$password

$username = _IEGetObjByName ($oIE,"login")

$password = _IEGetObjByName ($oIE,"passwd")

 

_IEFormElementSetValue ($username, edit_1) ; I need help with this columb! If anyone know the %edit_1% in batch scripting, its that "command" i need help with!

_IEFormElementSetValue ($password,"") ; I need help with this columb! If anyone know the %edit_1% in batch scripting, its that "command" i need help with!

 

_IEAction ($,"click")

 

 

EndFunc

------------------------------------------------------------------------------------------------------------------------------------------------------------------

Edited by Melba23
Title changed

Share this post


Link to post
Share on other sites
Jos

To read the value of a control in your gui you need to use GuiCtrlRead().

The helpfile is your friend as it contains many examples.

Jos


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
water

Welcome to AutoIt and the forum!

Could you please be so kind and give your threads a meaningful title? Everyone on this forum is looking for help ;)


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Cryslacks

Water How do i change the title now?

YogiBear: I just wanted to make a script/gui/half-program, this is my first autoit script (not so good) But i think i will learn soon. Some day i hope!

Jos: I have read the helpfile but i dont under stand. could you Give me an example? Please i would be very glad.

Share this post


Link to post
Share on other sites
Jos

Which part do you not understand from the example shown for GUICtrlCreateEdit(), which probably needs to be a GuiCtrlCreateInput()?

It clearly shows how a control content is "read".

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
water

You can't change the title at the moment. I think you need to have 5 or 10 posts at least. Then you open the full editor on the first post and change the title. Thanks :)


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
lewisg

In the line:

_IEFormElementSetValue ($username, edit_1) ; I need help with this columb! If anyone know the %edit_1% in batch scripting, its that "command" i need help with!

errors because edit_1 is missing the starting $ (indicating a variable).

In the line:

_IEAction ($,"click")
no variable is given (i.e. declared/created)

I agree with YogiBear, if you're at the page, just login.

And I think Jos is correct also you want to use GuiCtrlCreateInput()

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  

×