Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

How to change the Selector setting in dropdown via autoit remotely.

$
0
0
Can someone help me get back on track?
I know the first line in the autoit file should be using the form element, but there is no form name or ID.
so I would like to address it direct knowing the name of the selector....
Local $oSelect = _IEFormElementGetObjByName($oIE, "tomselector")

Is this possible..


Html stuff...
<select name=tomselector>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>

Autoit stuff
Local $oSelect = _IE GetObjByName($oIE, "tomselector")
_IEFormElementOptionselect($oSelect, "Mercedes", 1, "byText")
Sleep(1000)
_IEFormElementOptionselect($oSelect, "mercedes", 1, "byValue")
Sleep(1000)
_IEFormElementOptionselect($oSelect, 0, 1, "byIndex")
Sleep(1000)


I only need one method above to set the options, but I was trying all 3 to see if I could get anyone to work.

Thanks

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>