Jump to content

How to set a radio box on a web page using autoit.


Recommended Posts

I am having a problem getting a radio box on a page to check using autoit..

The below code is in fact accessing each radio box one by one but not checking them

I sorta made up the $oInput.status or is that a real status that I just lucked across..

am I almost right... or no..

Local $oInputs = _IETagNameGetCollection($oIE, "input")

For $oInput In $oInputs

if $oInput.Type = 'radio' then $oInput.status = 'checked'

Next

<input name="RB1" value="1" type="radio" >

<input name="RB2" value="0" type="radio">

I cannot set the value to 1, since I believe its status I want to set and not value..

Thanks.

Link to comment
Share on other sites

Hmm the question seems to be about checking a radio button dynamically

This can be done using javascript

<input type="radio" name="RB1" id="test" value="test" >my_radio<BR>
<script>
document.getElementById("test").checked = true;
</script>
so translation to autoit doesn't look so hard Edited by mikell
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...