Nezoic Posted June 6, 2008 Share Posted June 6, 2008 (edited) Anyone know how I can read all items in an IE combo box? I can read the selected item via _IEFormElementGetValue but it only returns the selected value of that form element. Edited June 6, 2008 by Nezoic Link to comment Share on other sites More sharing options...
Airwolf Posted June 6, 2008 Share Posted June 6, 2008 Anyone know how I can read all items in an IE combo box? I can read the selected item via _IEFormElementGetValue but it only returns the selected value of that form element.I don't know of an _IE function which will do this for you, but you could always search through the source using _IEDocReadHTML() and _StringRegExp(). Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 6, 2008 Share Posted June 6, 2008 Modified from one of the examples in the help file: ; ******************************************************* ; Example n - Open a browser with the form example, get reference to form, get reference ; to select element, get a reference to the Option tags, loop through displaying text. ; ******************************************************* ; #include <IE.au3> $oIE = _IE_Example ("form") $oForm = _IEFormGetObjByName ($oIE, "ExampleForm") $oSelect = _IEFormElementGetObjByName ($oForm, "selectExample") $colItems = _IETagNameGetCollection($oSelect, "Option") $sMsg = "" $n = 0 For $oItem In $colItems $sMsg &= $n & ": " & $oItem.text & @LF $n += 1 Next MsgBox(64, "Results", $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 Link to comment Share on other sites More sharing options...
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