Sean78 Posted October 28, 2009 Share Posted October 28, 2009 Hello everyone, first let me introduce myself...I am Sean and a NEEEWWWWW AutoIT user. I have a task to complete for work in which we go to a specific website and login, we only have one user id and password, that is why we mainly want it scripted. I have been staring and reading and trying for hours now, and haven't made much progress other than getting the site up. By now you know programming is not my strong suit. I REALLY need you guys help making this work please. Here is what I have: $my_url = "https://secure.williams-int.com/customers/login.asp" ShellExecute ( "C:\Program Files\Internet Explorer\iexplore.exe", $my_url ) $o_login = _IEFormElementGetObjByName ($o_form, "login") $o_password = _IEFormElementGetObjByName ($o_form, "passwd") $o_signin = _IEFormElementGetObjByName ($o_form, "Sign In") $username = "test" $password = "test" _IEFormElementSetValue ($o_login, $username) _IEFormElementSetValue ($o_password, $password) _IEAction ($o_signin, "click") The "test" was put in intentionally to just test the script I will replace w/ the actual login criteria later. I encourage anyone willing to help to visit the site listed at the top of my script, as I don't think the login/password fields I have are done correctly, however I have tried several variations. Please help guys....I am visibly frustrated (and my wife agrees) Link to comment Share on other sites More sharing options...
ame1011 Posted October 28, 2009 Share Posted October 28, 2009 (edited) #include <IE.au3> Local $oUser, $oPass, $oSubmit Local $sUser = "testUsername" Local $sPass = "testPassword" Local $url = "https://secure.williams-int.com/customers/login.asp" Local $oIE = _IECreate($url, 1) _IELoadWait($oIE) $oInputs = _IETagNameGetCollection($oIE, "input") for $oInput in $oInputs if $oInput.type = "text" And $oInput.name = "userid" And $oInput.size = "12" Then $oUser = $oInput if $oInput.type = "password" And $oInput.name = "password" And $oInput.size = "12" Then $oPass = $oInput if $oInput.type = "submit" And $oInput.value = " SIGN IN " Then $oSubmit = $oInput if isObj($oUser) And isObj($oPass) And isObj($oSubmit) then exitloop Next $oUser.value = $sUser $oPass.value = $sPass _IEAction($oSubmit, "click") _IELoadWait($oIE) Edited October 28, 2009 by ame1011 [font="Impact"] I always thought dogs laid eggs, and I learned something today. [/font] Link to comment Share on other sites More sharing options...
Sean78 Posted October 28, 2009 Author Share Posted October 28, 2009 THANK YOU AME1011!!!!!!!!!!! OH MY GOD, WORKS PERFECT, DEFINITELY A HUGE THANK YOU!!! Link to comment Share on other sites More sharing options...
gte Posted October 28, 2009 Share Posted October 28, 2009 Now your wife can have peace again THANK YOU AME1011!!!!!!!!!!! OH MY GOD, WORKS PERFECT, DEFINITELY A HUGE THANK YOU!!! HP OpenView ServiceCenter keep alive scriptRemote Desktop Login Script 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