Jump to content

Search the Community

Showing results for tags '_ieformelementoptionselect'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

Found 3 results

  1. Hi All, I have a question related to _IEFormElementOptionSelect in the reference file. This drop down contains three items; Homepage, Midipage, Freepage. How can I get the name of these items? If I use .innertext, in another drop down list contains spaces, so I cannot split them. ; 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(10) _IEFormElementOptionSelect($oSelect, "midipage.html", 1, "byValue") Sleep(10) _IEFormElementOptionSelect($oSelect, 0, 1, "byIndex") Sleep(10) Next _IEQuit($oIE) ;== Question == $aItems = StringSplit($oSelect.innerText, " ") For $i = 1 To $aItems[0] - 1 ConsoleWrite("Item-" & $i & ": " & $aItems[$i] & @CRLF) Next
  2. Website that I have about 100 programs wrapped around just updated their site code. I have the majority figured out but there is this drop down option select that has a data-bind. I think my problem will be solved with some sort of fireevent. But I cannot figure which one. It could also be how I am selecting the options as well. Here is the code that I have(I got desperate and just loaded up a bunch of fireevents and none of them fixed my issue. I left them in just to show which ones I tried so far) HTML SECTION OF MY CODE I found this from another post and think it might help me but I am not sure what it means in terms of actual application. .: I did try $oSelect.value = "CCX" in place of _IEFormElementOptionSelect ($oSelect, 'CCX', 1, 'byValue') but that did not work either. The way I have it written shows the value appearing in the box itself but when I try to run the search on their site it returns with no records. If I select a different option with my mouse and change it back to the actual option I want to select, it then returns the value I am seeking. So I know I am connected to the object, just not selecting the value correctly. Any insight would be much appreciated.
  3. Dear AutoIt Community, I'm trying to get AutoIt to loop through three drop-down selection boxes in IE. The picture below is of the boxes I want to loop through: After much trial and error I've managed to get AutoIt to read all of the options of the first selection box into an array. My plan was to use a For In Next loop several times to get AutoIt to select each option from each box one-by-one and submit the form. Below is an example of my code so far: #include <IE.au3> #include <Array.au3> $s_1stCountry = "" $s_URL = "www.autoitforumexample.com" $o_IE = _IECreate ($s_URL) _IELoadWait ($o_IE) Global $o_lstCountry_Select = _IEGetObjByName ($o_IE, "lstCountry") Global $s_lstCountry_List = _IEPropertyGet ($o_lstCountry_Select, "innerhtml") Global $a_lstCountry_List = StringRegExp ($s_lstCountry_List, "\>([A-Z][A-Za-z\s]+)\<", 3) For $1stCountry In $a_lstCountry_List $s_1stCountry = $1stCountry _IEFormElementOptionSelect($o_lstCountry_Select, $s_1stCountry, 1, "byText") Sleep (5000) Next And below is a sample of the webpage code for the first selection box: <th>Country:</th> <td><select name="lstCountry" onchange="javascript:setTimeout('__doPostBack(\'lstCountry\',\'\')', 0)" language="javascript" id="lstCountry" style="width:250px;"> <option value="0"></option> <option selected="selected" value="10659">Albania</option> <option value="3506">Andorra</option> <option value="3687">Antigua and Barbuda</option> <option value="5647">Argentina</option> <option value="10686">Aruba</option> <option value="3623">Australia</option> <option value="3508">Austria</option> <option value="5657">Bahamas</option> <option value="9849">Bahrain</option> ...code keeps going and going When running my code I can get AutoIt to correctly select the first country "Andorra", however I get the following console error as AutoIt attempts to loop through the other countries: --> IE.au3 V2.4-0 Error from function _IEFormElementOptionselect, $_IEStatus_InvalidObjectType I really have no idea what I'm doing wrong here. How can the object be an invalid type if it worked first time? I've also tried using the byIndex $s_mode and not had any luck. Any and all help is much appreciated. Kind regards, icu
×
×
  • Create New...