Monty Posted August 8, 2009 Share Posted August 8, 2009 Hi guys, just a quick question...how do I select items from a list box on any webpage. I have attached a htm file (just as an example) and lets say I wanted to select "Item Three" from it. #include <IE.au3> $oIE = _IECreate("Test.htm") ; full link or path required. $oForm = _IEGetObjByName($oIE, "LIST_BOX_1") ??? Please help. Thank you kindlyTest.htm Link to comment Share on other sites More sharing options...
Authenticity Posted August 8, 2009 Share Posted August 8, 2009 #include <IE.au3> Dim $oIE = _IE_Example('form') Dim $oSelect = _IEGetObjByName($oIE, 'selectExample') $oSelect.scrollIntoView() MsgBox(0x40, 'Info', $oSelect.item($oSelect.selectedIndex).innerText) _IEFormElementOptionselect($oSelect, '2', 1, 'byIndex') MsgBox(0x40, 'Info', $oSelect.item($oSelect.selectedIndex).innerText) So you can select byIndex, byValue, byText, or interacting directly with the object properties or methods. Read the help file for the _IEFormElementOptionselect() function description. 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