Sign in to follow this  
Followers 0
Arclite86

Select RadioButton (IE)

10 posts in this topic

I need to select a radiobutton in IE I know the FF function for this but I could not find the IE version

This is the code:

<form id="switch_primary_form" action="switch_primary" class="bigradioform" method="post">
        <input class="bigradio" type="radio" name="account" value="2807567304">
      @dr_virgil<br>
        <input class="bigradio" type="radio" name="account" value="2807648726">
      @DrRobertSHa<br>
        <input class="bigradio" type="radio" name="account" value="2807655493">
      @DrSolomonJH1<br>
        <input class="bigradio" type="radio" name="account" value="2807692422">
      @DrClydeNVar<br>
        <input class="bigradio" type="radio" name="account" value="2807698267">
      @DrDennisPCo1<br>
        <input class="bigradio" type="radio" name="account" value="2807710981">
      @DrGregoryBM<br>
        <input class="bigradio" type="radio" name="account" value="2807752754">
      @DrRobertMPh<br>
        <input class="bigradio" type="radio" name="account" value="2807772110">
      @DrSeanRSmit<br>
        <input class="bigradio" type="radio" name="account" value="2807891370">
      @Drrudy_silv<br>
        <input class="bigradio" type="radio" name="account" value="2807969299">
      @DrJohnnyKTr<br>
        <input class="bigradio" type="radio" name="account" value="2807974142">
      @DrChristopher3<br>
        <input class="bigradio" type="radio" name="account" value="2807974627">
      @dr_bullard<br>
        <input class="bigradio" type="radio" name="account" value="2807987911">
      @DrBryanEBul<br>
        <input class="bigradio" type="radio" name="account" value="2807999401" checked="checked">
      <strong>@DrMichealSP (Current Primary) </strong><br>
    
    <br><br>
  <a class="btn btn_smaller btn_gray inline_block" href="/account/manage_owned">« Cancel</a>&nbsp;
    <a href="#" class="btn btn_smaller btn_blue inline_block btn_submit_form">Confirm »</a>
  </form>

I know this is the working code for FF:

_FFFormRadioButton("account", Number($i),"name","switch_primary_form", "id")

Share this post


Link to post
Share on other sites



_IEFormElementRadioSelect

Share this post


Link to post
Share on other sites

_IEFormElementRadioSelect($oForm, "bigradio", "account", Default, Default, Default) ; added default values to the last 3 parameters to show that you could just use the first 3 parameters without specifying the others.

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites

even If I use this code you showed me I stil get an error :(

I have tried to select the one of the 15 Radiobuttons by typing 5 (radiobotton 5)in one of the places you marked as "Default" to select the fifth radiobutton  just like the in the FF version so it will fit good in the rest of my script but that didnt work,  And I dont know if that is possible?, because I have a allot of radiobuttons forms like this so I use a loop for it so it is unpossible to call the radio button by name or value nummer.

Share this post


Link to post
Share on other sites

Give this a try :)

_IEFormElementRadioSelect($oForm, "2807698267", "account", 1, "byValue", 1)

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites

You need to review the help file and the examples because you are not passing the the correct parameters.

Hint:

 

$sString          Value used to match element - treatment based on $sMode

Share this post


Link to post
Share on other sites

Give this a try :)

thank you, It will propably work but I use this function in a loop and the $sString: 2807698267 will only count for one time

I really need something that will work for loop after loop

just as in the FF function:

_FFFormRadioButton("account", Number($i),"name","switch_primary_form", "id")

Number($i) will read a input that gives a number from 0 to 15 it will go like 1,2,3,4,5...etc so every radio button gets a turn

but I dont know if that is possible in this function?

Share this post


Link to post
Share on other sites

 

?

Local $oForm = _IEFormGetObjByName($oIE, "switch_primary_form")
For $i = 0 To 15
    _IEFormElementRadioSelect($oForm, $i, "account", 1, "byIndex")
Next

Thank you very much

this is actually what I meant :)

Local $oForm = _IEFormGetObjByName($oIE, "switch_primary_form")
$i = GUICtrlRead ($listcounter2)
    _IEFormElementRadioSelect($oForm, Number($i), "account", 1, "byIndex")

Thank you very much now I can continue creating my script :)

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