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)
Website Login Script
Started by
Sean78
, Oct 28 2009 12:46 AM
3 replies to this topic
#1
Posted 28 October 2009 - 12:46 AM
#2
Posted 28 October 2009 - 05:01 AM
AutoIt
#include <IE.au3> Local $oUser, $oPass, $oSubmit Local $sUser = "testUsername" Local $sPass = "testPassword" Local $url = "<a href='https://secure.williams-int.com/customers/login.asp' class='bbc_url' title='External link' rel='nofollow external'>https://secure.williams-int.com/customers/login.asp"</a> 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 by ame1011, 28 October 2009 - 05:30 AM.
I always thought dogs laid eggs, and I learned something today.
#3
Posted 28 October 2009 - 12:12 PM
THANK YOU AME1011!!!!!!!!!!! OH MY GOD, WORKS PERFECT, DEFINITELY A HUGE THANK YOU!!!
#4
Posted 28 October 2009 - 12:35 PM
Now your wife can have peace again 
THANK YOU AME1011!!!!!!!!!!! OH MY GOD, WORKS PERFECT, DEFINITELY A HUGE THANK YOU!!!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users





