Plinius1 Posted May 6, 2007 Share Posted May 6, 2007 Hello reader, I am having trouble with finding the right code for the radio buttons on the webpage below. This code part works fine for the 2 radio buttons ><input type="radio" name="les" value="zelf" onclick='submit and ><input type="radio" name="les" value="animatie" onclick='submit(); It selects the radio button "animatie" correct when $lesD = "animatie" ********************************************* code working *************************************** $lesD = "animatie" $sURL = "www.horsetycoon.nl" $oIE = _IECreate($sURL, 0, 0, 0) $HWND = _IEPropertyGet($oIE, "hwnd") WinSetState($HWND, "", @SW_MAXIMIZE) _IENavigate ($oIE, "http://www.horsetycoon.nl/rijden/dressuur.php") $oForm = _IEFormGetObjByName ($oIE, " ") _IEFormElementRadioSelect ($oForm, $lesD, "les", 1, "byValue") sleep(1000) _IEFormSubmit ($oForm) How do i get the code to work for <option value='169102'>rexy's la fon</option> and <option value='183885'>Roosel</option> etc ?? I tried this code but this did not work to get "Roosel" out of the list. ********************************************* code not working *************************************** $oForm = _IEFormGetObjByName ($oIE, "dress_les") $oSelect = _IEFormElementGetObjByName ($oForm, "paard") Sleep(1000) _IEFormElementOptionselect ($oSelect, "Roosel", 1, "byName") Hope 1 of us has the answer - will be great if you give a reaction. ********************************************* webpage *************************************** <td align="center" width="100%" valign="top"> <form method="post" name="dress_les"> <table border="1" bordercolor="#000000" cellpadding="2" cellspacing="1" width="99%"> <tr> <th colspan="4">Dressuurles nemen</th> </tr> <tr> <th>Les</th> <th>Prijs</th> <th>Punten</th> <th>Kiezen</th> </tr> <tr> <td> <b>Voor jezelf rijden:</b> </td> <td>-</td> <td>+2%</td> <td><input type="radio" name="les" value="zelf" onclick='submit();'></td> </tr> <tr> <td> <b>Animatieles:</b> </td> <td> 6,-</td> <td>+4%</td> <td><input type="radio" name="les" value="animatie" onclick='submit();'></td> </tr> </table> <p> <table border="1" bordercolor="#000000" cellpadding="2" cellspacing="1" width="99%"> <tr> <th colspan="2">Paard kiezen</th> </tr> <tr> <td width="50%" align="right"> <b>Paard:</b> </td> <td width="50%" align="left"> <select name="paard" style="width:145px;"> <option value=""></option> <option value='169102'>rexy's la fon</option><option value='183885'>Roosel</option><option value='118240'>Schnappie's Little Momma</option><option value='173405'>t.a sollie</option><option value='191381'>US Jokke</option> </select> </td> </table> <p> <table border="1" bordercolor="#000000" cellpadding="2" cellspacing="1" width="99%"> <tr> <th colspan="5">Privé dressuurles nemen</th> </tr> <tr> <th>Instructeur</th> <th>Prijs per les</th> <th>Ervaring</th> <th>Punten</th> <th>Kiezen</th> </tr> <tr bgcolor='#D6DEB8'> <td><a href='../profiel/?id=60703'>AnnePanne</a></td> <td> 16,-</td> <td>16.397xp</td> <td>+8-10%</td> <td><input type='radio' name='les' value='60703' onclick='submit();'></td> </tr> <tr bgcolor=''> <td><a href='../profiel/?id=81867'>sidarta</a></td> <td> 16,-</td> <td>38.314xp</td> <td>+8-10%</td> <td><input type='radio' name='les' value='81867' onclick='submit();'></td> </tr> <tr> <th colspan="5"> </td> </tr> </table> <input type="hidden" name="sub_les"> </form> </td> <td width="150" align="center" valign="top"> <script> Link to comment Share on other sites More sharing options...
DaleHohm Posted May 6, 2007 Share Posted May 6, 2007 There is no "byName" mode for _IEFormElementOptionselect -- try "byText" Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
Plinius1 Posted May 6, 2007 Author Share Posted May 6, 2007 There is no "byName" mode for _IEFormElementOptionselect -- try "byText"DaleYou are correct - (thnx for reply ) my mistake in making the question - changing to text or value or index doesnt help. Link to comment Share on other sites More sharing options...
DaleHohm Posted May 6, 2007 Share Posted May 6, 2007 Are you running in SciTe? What messages are sent to the SciTe console? Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
Plinius1 Posted May 6, 2007 Author Share Posted May 6, 2007 Are you running in SciTe? What messages are sent to the SciTe console?DaleYep running Scite4autoit3problem is i think that the code cant find the value of <option value='169102'>rexy's la fon</option> . take a look at the website plz 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