UDF IE.au3 introduction and application tutorial [
The second talk, we began to discuss how to fill out a form first, before briefly about the HTML form (Form).
HTML form (Form) is an important part of HTML, mainly used to collect and submit user input information.
HTML form (Form) commonly used controls are:
input type = text with * indicates)
input type = br> input type = find a web form and form controls inside.
Here we combine mail.163.com to explain how to log on automatically fill
This is when we want to operate several components: the following categories
1 user name
2, password
3, the default version / speed 3.0 / simple
4, Remember username / enhanced security
5, log-mail / login network disk
this five-part is 163mail which form controls, here we need to look at the following two functions
_IEFormGetCollection return the form within the document on behalf of the target set of variables, and @ EXTENDED record number of
_IEFormElementGetCollection return the form on behalf of the specified All form controls collection of the target variable, and @ EXTENDED record number of controls within the form
good to know the above brief description of two functions, we can write:
# include
$ oIE = _IECreate (; @ extended & ,
For In
statements
...
Next
is a variable, without prior notice
variable is an array or collection (at least one element)
role All elements listed .
Why mention this it?
because _IEFormGetCollection ($ oIE) returns a collection, $ oQuerys = _IEFormElementGetCollection ($ oForms) this is wrong,
The correct way is:
For $ Form In $ oForms
MsgBox (0, )
Next
where $ Form is arbitrary definition of variables, can be any of the variables, the controls for the form you can find ways to get the same token,
full view out the form method a,
CODE
# include
$ oIE = _IECreate (Form.name)
$ oQuerys = _IEFormElementGetCollection ($ Form)
For $ Query In $ oQuerys
MsgBox (0, . name & There are HTML-based web of friends can see the source files, check, no friend suggested using Dreamweaver-based point of view, is not difficult.
third step, we fill out this form to let autoit3,
first talk about ideas, because we have by the above methods to find relevant information, you can obtain the following information:
form: a name is login163
1, user name: username type text
2, Password: passward type passward
3, version The default / speed 3.0 / simple: selType type is select-one
4, Remember username / Enhanced Security : remuser type is checkbox / secure type is checkbox
5, log-mail / login network disk: log-mail type is submit / login network disk type is submit
Here we used several functions
_IEFormGetObjByName return a form variable, This variable points to specify the name of the form
_IEFormElementGetObjByName returns a control variable, this variable points to specify the form and name of the control
_IEFormElementSetValue set the value of a form control then we first try
look, will write up the mailbox user name:
# include
$ oIE = _IECreate ($ oQuery = _IEFormElementGetObjByName ($ oForm, , ; Select Option > corresponds to > _IEFormElementCheckboxSelect ($ oForm, 0, We left to an onClick event for its Submit button on, as follows:
$ oQuery = _IEFormElementGetObjByName ($ oForm, > $ oQuery = _IEFormElementGetObjByName ($ oForm, some of the GUI side of things, we can write a good e-mail login tool 163, or even to make the software more than a mailbox Log
Summary:
a function of the speakers include:
IEFormElementCheckboxSelect
_IEFormGetObjByName ;
_IEFormElementGetCollection
_IEFormElementGetObjByName
_IEFormElementOptionSelect
_IEFormElementSetValue
following two functions are similar, we look to help you understand.
_IEFormElementGetValue
_IEFormElementRadioSelect
The code:
CODE
# include
$ oIE = _IECreate (_IEPropertySet ($ oIE, $ oIE, , br> $ oQuery = _IEFormElementGetObjByName ($ oForm,
|