Jump to content

need help for script


NEO12
 Share

Recommended Posts

Hello

I'm trying to make a little script to connect to my gmail and live account. i'm not a great script creator but i try to to my best.

I would like to know what i should do to send the username and password writted in the inputs:

post-50902-1250704647295_thumb.jpg

This is the code i use:

#include <IE.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("TraymenuMode",1)

$GUI = GUICreate("Login To:",200, 150, 300, 300)
GUISetBkColor(0x000000)

$Live = GUICtrlCreateButton("Live", 0, 10, 100)
$Gmail = GUICtrlCreateButton("Gmail", 100, 10, 100)
$username = GUICtrlCreateInput("",90 , 50, 100, 22)
$passwordlabel = GUICtrlCreateLabel("Username:", 8, 50, 80, 17)
GUIctrlSetColor(-1,0xFFFFFF)
$usernamelabel = GUICtrlCreateLabel("Password:", 8, 80, 80, 17)
GUIctrlSetColor(-1,0xFFFFFF)
$Password = GUICtrlCreateInput("",90 , 80, 100, 22)

GUISetState(@SW_SHOW)
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Live
            loglive()
        Case $Gmail
            logGmail()
    EndSwitch
WEnd

Func loglive()
$o = _IECreate ("http://login.live.com/")
_IELoadWait ($o)


Sleep (500)
Send($username)
Sleep (1000)
Send("{TAB}")
Sleep (1000)
Send($Password)
Sleep (1000)
Send("{ENTER}")
EndFunc




Func logGmail()
$o2 = _IECreate ("https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fhl%3Dfr%26tab%3Dwm%26ui%3Dhtml%26zy%3Dl&bsv=zpwhtygjntrz&scc=1&ltmpl=default&ltmplcache=2&hl=fr")
_IELoadWait ($o2)



Sleep (500)
Send($username)
Sleep (1000)
Send("{TAB}")
Sleep (1000)
Send($Password)
Sleep (1000)
Send("{ENTER}")
EndFunc

Thanks for your help.

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