Sign in to follow this  
Followers 0
KlemsonGuy

Select Entry in ComboBox in Internet Explorer

3 posts in this topic

I am trying to select a specific entry in a Combo Box in Internet Explorer. According to the AutoIt Active Window Info, the Control ID for this Combo Box is 5 (just the number 5, that's it, that's all). I'm able to use the following code to select the Combo Box:

ControlFocus("Placement And Recall - Microsoft Internet Explorer provided by Sherman Financial Group","",5)

However, it's my understanding that the next snippet of code should select the entry in the Combo Box listed as 'Post Initial Placement' (that is an entry in the Combo Box and it is typed accurately. Am I doing something wrong or maybe using the wrong command? Also, just for the record, the name of the browser is correct too (this was assured when the ControlFocus command worked. Thanks in advance for your help!

Code that is not working:

ControlCommand("Placement And Recall - Microsoft Internet Explorer provided by Sherman Financial Group","",5,"SelectString",'Post Initial Placement')

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I am trying to select a specific entry in a Combo Box in Internet Explorer. According to the AutoIt Active Window Info, the Control ID for this Combo Box is 5 (just the number 5, that's it, that's all). I'm able to use the following code to select the Combo Box:

ControlFocus("Placement And Recall - Microsoft Internet Explorer provided by Sherman Financial Group","",5)

However, it's my understanding that the next snippet of code should select the entry in the Combo Box listed as 'Post Initial Placement' (that is an entry in the Combo Box and it is typed accurately. Am I doing something wrong or maybe using the wrong command? Also, just for the record, the name of the browser is correct too (this was assured when the ControlFocus command worked. Thanks in advance for your help!

Code that is not working:

ControlCommand("Placement And Recall - Microsoft Internet Explorer provided by Sherman Financial Group","",5,"SelectString",'Post Initial Placement')

Web Browsers don't use standard windows controls. You can get access via AutoIt however by using COM and the IE DOM (document object model). See IE.au3 in my sig below.

Dale

Edit: typo

Edited by DaleHohm

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

Web Browsers don't use standard windows controls. You can get access via AutoIt however by using COM and the IE DOM (document object model). See IE.au3 in my sig below.

Dale

Edit: typo

Wow! Thank you for pointing me in the right direction. This code is AMAZING! I think Microsoft should hire you! :o

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0