Rawox Posted January 15, 2009 Share Posted January 15, 2009 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: expandcollapse popup#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 More sharing options...
youknowwho4eva Posted January 15, 2009 Share Posted January 15, 2009 I'd look into the IE udf Giggity Link to comment Share on other sites More sharing options...
AlmarM Posted January 15, 2009 Share Posted January 15, 2009 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 More sharing options...
cnsnc Posted January 17, 2009 Share Posted January 17, 2009 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 More sharing options...
do3z Posted January 18, 2009 Share Posted January 18, 2009 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 EndSwitchWEndI am not good at English,sorryHey 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 More sharing options...
cnsnc Posted January 18, 2009 Share Posted January 18, 2009 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?CODEWhile 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 EndSwitchWEnd Link to comment Share on other sites More sharing options...
do3z Posted January 22, 2009 Share Posted January 22, 2009 CODEWhile 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 EndSwitchWEndhey 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 More sharing options...
BrettF Posted January 22, 2009 Share Posted January 22, 2009 Check out my LoginBox UDF, the link is in my sig. Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now