AutID Posted December 6, 2014 Share Posted December 6, 2014 I have 0.1 http knowledge. So my attempt to log in to Hotmail is this: #include "WinHttp.au3" ;~ Local $sURL = "https://login.live.com/login.srf?wa=wsignin1.0&rpsnv=12&ct=1417894769&rver=6.4.6456.0&wp=MBI_SSL_SHARED&wreply=https:%2F%2Fdub120.mail.live.com%2Fdefault.aspx%3Frru%3Dinbox&lc=2057&id=64855&mkt=en-gb&cbcxt=mai" Local $sURL = "http://hotmail.com/" Local $hOpen = _WinHttpOpen() Local $hConnect = _WinHttpConnect($hOpen, $sURL) Local $sResult = _WinHttpSimpleFormFill($hConnect, Default, _ "f1", _ "i0116", "email", _ "i0118", "pass") If @error Then ConsoleWrite("Error: " & @error & @LF) _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hOpen) Else _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hOpen) ConsoleWrite($sResult & @CRLF) EndIf which fails. Any http gurus to lend me a hand here? https://iblockify.wordpress.com/ Link to comment Share on other sites More sharing options...
computergroove Posted December 6, 2014 Share Posted December 6, 2014 I added the latest winhttp.au3 to my includes directory in autoit and ran the code and it didn't kick back an error. What are you trying to do with this? Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html Link to comment Share on other sites More sharing options...
AutID Posted December 6, 2014 Author Share Posted December 6, 2014 The obvious, log in to Hotmail. According to winhttp site (http://code.google.com/p/autoit-winhttp/downloads/list), I have the latest version which is 1.6.3.7 I don't know which is the version which you included and didn't throw an error but please share it with me. https://iblockify.wordpress.com/ Link to comment Share on other sites More sharing options...
computergroove Posted December 6, 2014 Share Posted December 6, 2014 (edited) 1.6.3.7 Edit - whoops it looks like i am getting 1 error Edited December 6, 2014 by computergroove Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html Link to comment Share on other sites More sharing options...
AutID Posted December 6, 2014 Author Share Posted December 6, 2014 Then one of us is doing something wrong... For me _WinHttpSimpleFormFill function returns error 1 which means that there are no forms in that page... https://iblockify.wordpress.com/ Link to comment Share on other sites More sharing options...
AutID Posted December 7, 2014 Author Share Posted December 7, 2014 Ok anyone else? I am trying to do this because smtp isn't working for some reason and after 10000 solutions I tried it still is not working. https://iblockify.wordpress.com/ Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 7, 2014 Moderators Share Posted December 7, 2014 Unfortunately, I don't have that udf downloaded, nor do I have the time to play with it. Maybe the redirect kills it. Maybe it's case sensitive (don't know the func). You've really not provided anything you've done to debug this, so here's my advice...Take the udf function, break it down into parts. Use the html from live.com <form method="post" name="f1" target="_top"><div class="section"><div style="display: none;" id="idTd_Tile_Error" aria-relevant="text" aria-live="assertive" aria-atomic="true"><div id="idTd_Tile_ErrorMsg_Login" class="errorDiv first"></div></div><div style="display: none;" id="idTd_PWD_Error" aria-relevant="text" aria-live="assertive" aria-atomic="true"><div id="idTd_PWD_ErrorMsg_Username" class="errorDiv first">Generic Password Error Message</div></div><div id="idTd_PWD_UsernameLbl" class="row label"><span id="idLbl_PWD_Username" role="heading">Microsoft account <a id="idA_MSAccLearnMore" href="http://go.microsoft.com/fwlink/?LinkID=254486" target="_blank">What's this?</a></span></div><div id="idDiv_PWD_UsernameTb" class="row textbox"><div style="width: 100%; position: relative;"><input id="i0116" lang="en" class="ltr_override" aria-labelledby="idLbl_PWD_Username" name="login" maxLength="113" type="email"><div style="left: 0px; top: 0px; width: 100%; position: absolute; z-index: 5;" class="phholder"><div aria-hidden="true" style="cursor: text;" id="idDiv_PWD_UsernameExample" class="placeholder ltr_override">someone@example.com</div></div></div></div><div style="display: none;" id="idTd_PWD_Error_Password" aria-relevant="text" aria-live="assertive" aria-atomic="true"><div id="idTd_PWD_ErrorMsg_Password" class="errorDiv"></div></div><div id="idDiv_PWD_PasswordTb" class="row textbox"><div style="width: 100%; position: relative;"><input id="i0118" aria-labelledby="idDiv_PWD_PasswordExample" name="passwd" type="password"><div style="left: 0px; top: 0px; width: 100%; position: absolute; z-index: 5;" class="phholder"><div aria-hidden="true" style="cursor: text;" id="idDiv_PWD_PasswordExample" class="placeholder">Password</div></div></div></div><div id="idTd_PWD_KMSI_Cb"><input id="idChkBx_PWD_KMSI0Pwd" name="KMSI" value="1" type="checkbox"><label id="idLbl_PWD_KMSI_Cb" for="idChkBx_PWD_KMSI0Pwd">Keep me signed in</label></div></div><div id="idTd_PWD_SubmitCancelTbl" class="section"><input id="idSIButton9" class="default" name="SI" value="Sign in" type="submit"></div><div class="section"><div id="idDiv_PWD_ForgotPassword" class="row small"><a id="idA_PWD_ForgotPassword" href="https://account.live.com/ResetPassword.aspx?wreply=https://login.live.com/login.srf%3fwa%3dwsignin1.0%26rpsnv%3d12%26ct%3d1417894769%26rver%3d6.4.6456.0%26wp%3dMBI_SSL_SHARED%26wreply%3dhttps:%252F%252Fdub120.mail.live.com%252Fdefault.aspx%253Frru%253Dinbox%26lc%3d2057%26id%3d64855%26mkt%3den-gb%26cbcxt%3dmai%26bk%3d1417971425&id=64855&uiflavor=web&uaid=94e767c0d32240fb9e280a1ec6346e37&mkt=EN-GB&lc=2057&bk=1417971425">Can't access your account?</a></div><div id="idTD_PWD_SwitchToOTCLink" class="row small"><a id="idA_PWD_SwitchToOTC" href="">Sign in with a single-use code</a></div></div></form> To see if you can spot the issue. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. 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