Sign in to follow this  
Followers 0
bobbo85

Finding things in IE Forms

3 posts in this topic

I'm a bit new to the _IE functions and am having a hard time locating parts of a webpage when I want to fill in the info.

As an example, how can I get autoit to check the first checkbox here? They are both in the same group of checkboxes.

<input type="checkbox" name="chkPostingSites" value="288" >

<input type="checkbox" name="chkPostingSites" value="1004" >

I found this in help:

_IEFormElementCheckBoxSelect ( ByRef $o_object, $s_string [, $s_name = "" [, $f_select = 1 [, $s_mode = "byValue" [, $f_fireEvent = 1]]]] )

So far I have tried doing this:

$o_form = _IEFormGetCollection ($oIE, 0)
_IEFormElementCheckboxSelect ($o_form, "chkPostingSites", "1004", 1, "byValue")

but get the error $_IEStatus_NoMatch

Thanks in advance!

Share this post


Link to post
Share on other sites



I'm a bit new to the _IE functions and am having a hard time locating parts of a webpage when I want to fill in the info.

As an example, how can I get autoit to check the first checkbox here? They are both in the same group of checkboxes.

<input type="checkbox" name="chkPostingSites" value="288" >

<input type="checkbox" name="chkPostingSites" value="1004" >

I found this in help:

_IEFormElementCheckBoxSelect ( ByRef $o_object, $s_string [, $s_name = "" [, $f_select = 1 [, $s_mode = "byValue" [, $f_fireEvent = 1]]]] )

So far I have tried doing this:

$o_form = _IEFormGetCollection ($oIE, 0)
_IEFormElementCheckboxSelect ($o_form, "chkPostingSites", "1004", 1, "byValue")

but get the error $_IEStatus_NoMatch

Thanks in advance!

This function is confusing in its use of $s_string and $s_name. I think yours should be:
_IEFormElementCheckboxSelect ($o_form, "288", "chkPostingSites", 1, "byValue")

The $s_string is interpreted as a value because you specified "byValue" in $s_mode. It is "288" because you said you want the first one.

The $s_name specifies the "group" of checkboxes, which are differentiated by the values.

:P


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Worked like a charm! Thank you very much!

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