Jump to content

Email login script


 Share

Recommended Posts

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

  • Developers

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 etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • Developers

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 etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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()

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...