Sign in to follow this  
Followers 0
zhaicheng

How to fill this form(no name)

2 posts in this topic

http://hgsyzx.upc.edu.cn/zhai/1111.html

thanks!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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.

Example:

#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  
Followers 0