Jump to content

How to Identify different Form Elements


Recommended Posts

Hi!

I've got a question about the _IEFormElementGetCollection function.

I know how to use the information in the collection object, and how to use the different form elements. But how can I identiy what kind of form element is what? For example Textelement, radioselect, checkbox select, etc..

Link to comment
Share on other sites

Use .type:

#include <IE.au3>

$oIE = _IE_Example("form")
$oForm = _IEFormGetCollection($oIE, 0)
$colElements = _IEFormElementGetCollection($oForm)
$n = 0
For $oElement In $colElements
    ConsoleWrite($n & ": " & $oElement.type & @LF)
    $n += 1
Next

:idea:

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
Link to comment
Share on other sites

Thanks!!

I'm fairly new using autoit, and this script is the first time i'm using the .name, .count & .type functions. Where can I read up on this in the help file, what are those functions called?

Thank in advance,

Thomas

Link to comment
Share on other sites

They are not functions and not defined by AutoIt, they are properties of the objects. The objects are defined by whatever app created them. In this case, the IE Document Object Model (DOM) element properties. MSDN: DHTML Properties

Notice from that list that .type can mean many different things depending on what kind of object it is for.

:idea:

P.S.: There is a general info section in help file called OBJ/COM Reference.

:)

Edited by PsaltyDS
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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...