Sign in to follow this  
Followers 0
fielmann

_IEFormElementGetCollection <- Need all .name

4 posts in this topic

hello autoit friends,

How to collect all names of the objects in a form?

The autoit-help-file does not help me at this point.

I need a routine like this:

$oForms = _IEFormGetCollection ($oIE)
  MsgBox(0, "Forms Info", "There are " & @extended & " forms on this page")
  For $oForm In $oForms
  MsgBox(0, "Form Info", $oForm.name)
Next

Any ideas?

Thx in advanced.

Share this post


Link to post
Share on other sites



Try this:

#include <IE.au3>

_IEErrorHandlerRegister()

$sMsg = ""
$oIE = _IE_Example("Form")
$colForms = _IEFormGetCollection($oIE)
For $oForm In $colForms
    $sMsg &= "Form:  " & $oForm.id & @LF
    $colElements = _IETagNameAllGetCollection($oForm)
    For $oElement In $colElements
        $sMsg &= @TAB & "Tag = " & $oElement.tagname & "; .id = " & $oElement.id & "; .name = " & $oElement.getAttribute("name", 2) & @LF
    Next
Next

ConsoleWrite($sMsg)

:)


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

perfect! :)

I can analyse a website much better:

Now I can find and address websiteobjects much better!

THX :)

Share this post


Link to post
Share on other sites

If you are analyzing web sites, you would do much better with DOM Inspectors, like DebugBar for IE, or FireBug for Firefox.

:)


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

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