Churchy112 Posted February 27, 2012 Share Posted February 27, 2012 Hi Guys.. I am really new to Autoit but i'm hoping it will solve my problem. Im hoping to put together something which will allow me to log into my E-mail from a custom input box. So: Custom Input Box User name: JoeBlogs Password: xxxxx then script opens e-mail website and inputs JoeBlogs"@etc.com" and password and logs me in which also adds "@etc.com" Any advice would be most appreciated! Link to comment Share on other sites More sharing options...
Guest Posted February 27, 2012 Share Posted February 27, 2012 (edited) Can you post the website you are trying to do this with. E.G. How you can achieve what you want. #include <IE.au3> ; Create a browser window and navigate to hotmail $oIE = _IECreate("http://mail.yahoo.com") ; get pointers to the login form and username, password and signin fields Local $o_form = _IEFormGetObjByName($oIE, "login_form") Local $o_login = _IEFormElementGetObjByName($o_form, "login") Local $o_password = _IEFormElementGetObjByName($o_form, "passwd") Local $username = "your username here" Local $password = "your password here" ; Set field values and submit the form _IEFormElementSetValue($o_login, $username) _IEFormElementSetValue($o_password, $password) _IEAction($o_password, "focus") Edited February 27, 2012 by Guest Link to comment Share on other sites More sharing options...
Churchy112 Posted February 27, 2012 Author Share Posted February 27, 2012 It will be for www.outlook.com thanks Link to comment Share on other sites More sharing options...
Guest Posted February 27, 2012 Share Posted February 27, 2012 Are you going use the desktop program or the website outlook live. Link to comment Share on other sites More sharing options...
Churchy112 Posted February 27, 2012 Author Share Posted February 27, 2012 outlook live. basically im a it technician at a school and would like this for teachers to just type their username and password and script to add all the extras and log in, to make my life easier, as we just moved over to outlook live. Link to comment Share on other sites More sharing options...
Guest Posted February 27, 2012 Share Posted February 27, 2012 Try this. #include <IE.au3> ; Create a browser window and navigate to hotmail $oIE = _IECreate("http://www.outlook.com") Sleep(1000) Send("User Email here") ; Email Sleep(500) Send("{TAB}") Sleep(500) Send("User Password here") ; Password Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{ENTER}") Link to comment Share on other sites More sharing options...
Churchy112 Posted February 28, 2012 Author Share Posted February 28, 2012 Thanks, that does work, but isnt a solution to what im trying to do. the ultimate goal is to have a custom log in screen where I would enter my name and pwd and it would open IE > outlook.com input name and add "@EmailHere.com" and pwd and enter. Link to comment Share on other sites More sharing options...
Guest Posted February 28, 2012 Share Posted February 28, 2012 Here. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> GUICreate("Login",300,200,-1,-1) GUICtrlCreateLabel("Account Name:",20,32,200,25) GUICtrlCreateLabel("Password:",20,102,200,25) $UserNameCON = GUICtrlCreateInput("",20,50,260,22) $UserPasswordCON = GUICtrlCreateInput("",20,120,260,22,0x0020) $loginBtn = GUICtrlCreateButton("Login",105,160,100,25) GUISetState(@SW_SHOW) ; will display an empty dialog box ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Switch $msg Case $loginBtn $UserName = GUICtrlRead($UserNameCON) $UserPassword = GUICtrlRead($UserPasswordCON) $oIE = _IECreate("http://www.outlook.com") Sleep(1000) Send($UserName&"@EmailHere.com") ; Email <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Sleep(500) Send("{TAB}") Sleep(500) Send($UserPassword) ; Password Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{ENTER}") ExitLoop Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete() Link to comment Share on other sites More sharing options...
Churchy112 Posted February 28, 2012 Author Share Posted February 28, 2012 thats awesome Cheers bud!! Link to comment Share on other sites More sharing options...
Valik Posted February 28, 2012 Share Posted February 28, 2012 This thread violates the rules. Since you gave such shitty code though I don't have to delete it. Anyway, don't discuss how to automate logins on this forum. I suggest both of you read the rules before further posts. Link to comment Share on other sites More sharing options...
Valik Posted February 28, 2012 Share Posted February 28, 2012 Apparently Aipion got all butthurt over me saying his code was shit. Even though it is shit. Why is it shit? Because it uses Send(). Simple user interaction with the keyboard will break the script. There are much better ways of providing input to the elements on a page that the user cannot interrupt.It's ironic, really. I had just finished reading when I was directed towards the report directed at me. Kind of rings pretty damn true. For those curious, here's the report description:Wow so we can what ever we like on this forum to other people, like fuck you, you waste-man on the street i don't even know.Nice,I am looking forward to go around looking at random posts and saying fuck you which i don't think is very nick thing well thats coz if valik can do that then i can do that right. Nice example he is showing to every1.Let's pick this apart, shall we?Wow so we can what ever we like on this forum to other people, like fuck you, you waste-man on the street i don't even know.When did I say "fuck you" or advocate saying that? When did I mention anything about garbage? I didn't. I said the code was shit. This is not opinion. This is not subjective. It can be very clearly demonstrated scientifically that the code is bad because it is easy to break the script's flow of execution. There are very simple alternatives that are an order of magnitude more reliable. Then, of course, there's the years of empirical data I have that proving that Send() is unreliable on a good day due to unforeseen events. But what do I know.I am looking forward to go around looking at random posts and saying fuck you which i don't think is very nick thingYou know what I don't find to be very nice? People who fail to read the rules. You did not read the rules and helped somebody do something that violates our rules. Then you got some sand in your vag and abused the report feature to report me. Me. A moderator. You reported a moderator. What are the others going to do? Ban me for telling you and the OP to read the rules because you broke them? Choo choo. Hear that? It's the logic train. You missed it.well thats coz if valik can do that then i can do that right. Nice example he is showing to every1.This would be incorrect. I can get away with what I want because of substantial contributions to this language and this community. My eccentricities are tolerated because in general I'm valuable to have around. You? What purpose do you serve? Well right now you are serving as fodder for me to shred which others will find entertaining. So you have that going for you I guess. /golfclapAnyway. You get a 7 day ban for your little report. My suggestion to you is accept the 7 day ban, don't PM me - or other mods - to bitch about it and don't try to evade it. Basically anything but being quiet will lead to your permanent removal from this forum. No, you won't evade the removal. jaberwacky and Xandy 2 Link to comment Share on other sites More sharing options...
Recommended Posts