Sign in to follow this  
Followers 0
JacobA

IE Select Index Value Integer

5 posts in this topic

$category_chooser = Number(GUICtrlRead($GUI_Category))
        
        $testing = _IETagNameGetCollection($oIE_4, "select")
        For $u in $testing
                    _IEAction($u, "focus") 
                    _IEFormElementOptionSelect($u, $category_chooser, 1, "byIndex")
        Next

The above code is really basic, but it doesn't work.

It works if I delete "$category_chooser" inside the ...Optionselect method and stick in an integer myself, e.g. 6. But if $category_chooser is actually 6 it simply fails stating:

--> IE.au3 V2.4-0 Error from function _IEFormElementOptionselect, $_IEStatus_InvalidValue (Invalid index value, 6)

What's up with that???


Enjoy making solutions for points-2-shop

Share this post


Link to post
Share on other sites



What type of Control is $GUI_Category?

Are you testing $category_chooser before using it? I know you're already making it a Number before it even gets to your FOR loop, but still gotta ask.

Share this post


Link to post
Share on other sites

The gui control is a combo (chooser menu as I would rather call it). And it just has numbers from 1 to 19 as those are the indexes of the <select> I am trying to index within. It works fine if I write 6 in there... but not if I define a variable as 6, then place the variable in the method... so I am really confused.


Enjoy making solutions for points-2-shop

Share this post


Link to post
Share on other sites

Ignore - I fixed it simply by using an input instead. I don't know why the integer was being passed differently with a combo.


Enjoy making solutions for points-2-shop

Share this post


Link to post
Share on other sites

Well . if you put:

$category_chooser = Number(GUICtrlRead($GUI_Category))
Consolewrite($category_chooser&@CRLF)

You will see why it happens like this.

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