JacobA Posted May 19, 2011 Share Posted May 19, 2011 $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 Link to comment Share on other sites More sharing options...
MrMitchell Posted May 19, 2011 Share Posted May 19, 2011 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. Link to comment Share on other sites More sharing options...
JacobA Posted May 19, 2011 Author Share Posted May 19, 2011 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 Link to comment Share on other sites More sharing options...
JacobA Posted May 20, 2011 Author Share Posted May 20, 2011 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 Link to comment Share on other sites More sharing options...
Juvigy Posted May 23, 2011 Share Posted May 23, 2011 Well . if you put: $category_chooser = Number(GUICtrlRead($GUI_Category)) Consolewrite($category_chooser&@CRLF) You will see why it happens like this. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now