Nitin Posted November 14, 2008 Posted November 14, 2008 I'm new with autoit so plz just point me in the right direction .... the thing is that whenever i connect to my university Wifi lan ... i have to login from a browser page before i can access the internet ... and then i have to re-login every 37 minutes or so ... ... so i need a script that can act as a web browser ... access the page and send the login data... how do i go about it? p.s. the page is simple http not the secure type
dbzfanatic Posted November 14, 2008 Posted November 14, 2008 There are plenty of examples. Read the _IE* functions in the helpfile and search the forums for "Browser login" or something similar. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote]
jvanegmond Posted November 14, 2008 Posted November 14, 2008 Like this, for example. #include <IE.au3> ; Create a browser window and navigate to hotmail $oIE = _IECreate ("http://www.hotmail.com") ; get pointers to the login form and username, password and signin fields $o_form = _IEFormGetObjByName ($oIE, "f1") $o_login = _IEFormElementGetObjByName ($o_form, "login") $o_password = _IEFormElementGetObjByName ($o_form, "passwd") $o_signin = _IEFormElementGetObjByName ($o_form, "SI") $username = "your username here" $password = "your password here" ; Set field values and submit the form _IEFormElementSetValue ($o_login, $username) _IEFormElementSetValue ($o_password, $password) _IEAction ($o_signin, "click") github.com/jvanegmond
AzKay Posted November 14, 2008 Posted November 14, 2008 $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") _HTTPRequest($oHTTP, "POST", "http://site.com/login.php", "username=wut&password=kthx") Func _HTTPRequest($oHTTP, $oMethod, $oURL, $oData = "") $oHTTP.Open($oMethod, $oURL, False) If $oMethod = "POST" Then $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $oHTTP.Send($oData) Return $oHTTP.ResponseText EndFunc # MY LOVE FOR YOU... IS LIKE A TRUCK- #
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