fielmann Posted March 1, 2011 Posted March 1, 2011 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) NextAny ideas?Thx in advanced.
PsaltyDS Posted March 1, 2011 Posted March 1, 2011 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
fielmann Posted March 2, 2011 Author Posted March 2, 2011 perfect! I can analyse a website much better: Now I can find and address websiteobjects much better! THX
PsaltyDS Posted March 2, 2011 Posted March 2, 2011 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now