Jump to content

Selecting a value from a ComboBox


Scoots
 Share

Recommended Posts

I've been perusing these forums looking for an answer, but I haven't had much luck. Basically what I am trying to do is to populate combo boxes on a webpage based on input on a GUI that I created. I am not having too much trouble with it for normal entries, but anything with a special character in front is making things hard. I am not able to post the HTML source directly, but a sample would be this entry in the combobox:

<OPTION value="http://www.perl.com">   ·HELLO!

<OPTION value="http://www.perl.com"> &# 160; &# 160; &# 160; &# 183; HELLO!

The function I am using for non-weird character is this

Func FillCombo($oBox, $text)
    WinActive("IssueEntry - Windows Internet Explorer")
    _IEAction($oBox, "focus")
    Send($text)
EndFunc

where $oBox is the combobox that I want to update, and $text is the value that I am trying to find in the list. There might be a better way to send the information directly to the combo box, but simulating typing it is the best option I have found so far. Any help would be much appreciated!

Edit: Added spaces in the original HTML line to show the special character codes.

Edited by Scoots
Link to comment
Share on other sites

Thank you for your help. It turns out my problem is I was passing the wrong ASCII code when I was parsing the whole HTML file, so it ended up searching for the wrong value in the combo box. /sigh, that one's on me.

Edited by Scoots
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...