rtorno Posted October 30, 2014 Share Posted October 30, 2014 I need help. I am self-taught and don't have any formal training in programming. I am trying to select an entry from a dropdown list in IE but I don't know how to do it. Below is the result from inspecting the drop down element using Chrome. <input name="ctl00$ContentPlaceHolder1$ddlContracts" type="text" class="rcbInput" id="ctl00_ContentPlaceHolder1_ddlContracts_Input" value="Accenture" readonly="readonly" autocomplete="off"> How do I use _IEFormElementOptionSelect and what is a "form"? I apologize for this newbie question. Your help is much appreciated. Link to comment Share on other sites More sharing options...
MikahS Posted October 30, 2014 Share Posted October 30, 2014 An HTML form is a section of a document containing normal content, markup, special elements called controls (checkboxes, radio buttons, menus, etc.), and labels on those controls. Here is an example using _IEFormElementOptionSelect() taken right from the helpfile : ; Open a browser with the form example, get reference to form, get reference ; to select element, cycle 10 times selecting options byValue, byText and byIndex #include <IE.au3> Local $oIE = _IE_Example("form") Local $oForm = _IEFormGetObjByName($oIE, "ExampleForm") Local $oSelect = _IEFormElementGetObjByName($oForm, "selectExample") _IEAction($oSelect, "focus") For $i = 1 To 10 _IEFormElementOptionSelect($oSelect, "Freepage", 1, "byText") Sleep(1000) _IEFormElementOptionSelect($oSelect, "midipage.html", 1, "byValue") Sleep(1000) _IEFormElementOptionSelect($oSelect, 0, 1, "byIndex") Sleep(1000) Next _IEQuit($oIE) Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ 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