Jump to content
Sign in to follow this  

How to fill this form(no name)

Recommended Posts




Share this post

Link to post
Share on other sites

Don't speak chinese so i try to guess that is only a big one page form.

Use _IEFormGetCollection with 0 as option to get the hook to that form.

Then use _IEFormElementGetCollection with a progressive number to get the hook to the various form elements.

I heavily commented for easy understanding.


#include <IE.au3>
;Create the webpage with $oIE=_IEAttach or _IECreate then you can go with the following code:

$oWholeForm = _IEFormGetCollection ($oIE,0)
;Search for the FIRST form in the page, if you put 1 it goes for the second. NOTE: A form IS not 1 form element but usually a collection of form elements (1 form element=1 of those typing spaces)

oFormUser=_IEFormElementGetCollection ($oLogForm,0);Looks for the first field to type in, in other words the 1st form element

$oFormPass=_IEFormElementGetCollection ($oLogForm,1); looks for the second form element

_IEFormElementSetValue($oFormUser,"My Username");fills the 1st form element with the string My Username

_IEFormElementSetValue($oFormPass,"My Password"); Fills the 2nd with My Password string

Hope it helps, tried to make it easy to understand, if you still have questions, ask.

Edited by Newb

I'm a compulsive poster. When I post something, come to read it at least 5 minutes later after the posting, because I will edit it. I edited even this signature a few minutes later after I wrote it.

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.