Jump to content

Recommended Posts

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 post
Share on other sites

#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)


$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

$oUser.value = $sUser
$oPass.value = $sPass
_IEAction($oSubmit, "click")


Edited by ame1011
[font="Impact"] I always thought dogs laid eggs, and I learned something today. [/font]
Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...