Jump to content
Sign in to follow this  

Auto sign in to web site. Can't get form to populate

Recommended Posts


#include <IE.au3>
HotKeySet("{ESC}", "_Exit")
HotKeySet('{NumPad1}', '_Run')

While 1

Func _Run()
    $URL = "http://peoplestring.com"
    $ObjIE = ObjCreate("InternetExplorer.Application")
    ;Wait until Forwarding Website loads
    With $ObjIE
        .Visible = True
        Until .ReadyState = 4
    ;Set Form Objects on Website

    With $ObjIE.document.forms(0)
        .user.value = ""
        .pass.value = ""

EndFunc   ;==>_Run

Func _Exit()
EndFunc   ;==>_Exit
Hey, can't find the form name. Website is in code

Share this post

Link to post
Share on other sites

Use a DOM inspector, like DebugBar, to see if the form is inside frame or within another form. Your .forms(0) returns only the first form from the root of the document. Are you sure it's the first form?


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post

Link to post
Share on other sites

The form is within an iFrame.

#include <IE.au3>

$sURL = "http://peoplestring.com/"
$sUsername = "username"
$sPassword = "password"


$oIE = _IECreate($sURL, 1)
$oFrame = _IEFrameGetCollection($oIE, 0)
$oForm = _IEFormGetCollection($oFrame, 0)
$oUsername = _IEFormElementGetObjByName($oForm, "user")
$oPassword = _IEFormElementGetObjByName($oForm, "pass")
_IEFormElementSetValue($oUsername, $sUsername)
_IEFormElementSetValue($oPassword, $sPassword)

Share this post

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

Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.