random42 Posted February 12, 2007 Share Posted February 12, 2007 First I identify that there are 3 forms and attempt to display their names - all come back as '0' though #include <IE.au3> $oIE = _IECreate ("http://www.neopets.com/games/cliffhanger/cliffhanger.phtml") $oForm = _IEFormGetCollection ($oIE, 0) $oForms = _IEFormGetCollection ($oIE) MsgBox(0, "Forms Info", "There are " & @extended & " forms on this page") For $oForm In $oForms MsgBox(0, "Form Info", $oForm.name) Next MsgBox(0, "Forms Info", "Finished") Next I try to select a radio button - any radio button, just to identify that something is happening #include <IE.au3> $oIE = _IECreate ("http://www.neopets.com/games/cliffhanger/cliffhanger.phtml") $oForm = _IEFormGetCollection ($oIE,0) $oForms = _IEFormGetCollection ($oIE) MsgBox(0, "Forms Info", "There are " & @extended & " forms on this page") For $oForm In $oForms MsgBox(0, "Forms Info", "Doing form" & @extended & ".") _IEFormElementRadioSelect ($oForm, 0, @extended, 1, "byIndex") Sleep(1000) _IEFormElementRadioSelect ($oForm, 1, @extended, 1, "byIndex") Sleep(1000) _IEFormElementRadioSelect ($oForm, 2, @extended, 1, "byIndex") Sleep(1000) Next MsgBox(0, "Forms Info", "Finished") and #include <IE.au3> $oIE = _IECreate ("http://www.neopets.com/games/cliffhanger/cliffhanger.phtml") $oForm = _IEFormGetCollection ($oIE,0) $oForms = _IEFormGetCollection ($oIE) For $i = 1 To 2 _IEFormElementRadioSelect ($oForm, 0, "start_game", 1, "byIndex") Sleep(1000) _IEFormElementRadioSelect ($oForm, 1, "start_game", 1, "byIndex") Sleep(1000) _IEFormElementRadioSelect ($oForm, 2, "start_game", 1, "byIndex") Sleep(1000) Next also swapped the "start game" lines to be 0, 1, 2 All methods have returned the same error for every try to pick a radio button: --> IE.au3 Warning from function _IEFormElementRadioSelect, $_IEStatus_NoMatch The help on the _IEFormElementRadioSelect fuction has this error listed but doesn't say what to do with it. some of the code from the page with the radio buttons <p><b>Cliffhanger</b></p><p align='center'><img src='http://images.neopets.com/pets/happy/tuskaninny_green_baby.gif' width=150 height=150 border=0></p><p align='center'><b>You wanna play, huh?</b><form action='process_cliffhanger.phtml' method='post'><input type='hidden' name='start_game' value=true><br><br><b>Skill Level</b><br><b>Easy</b><input type='radio' name='game_skill' value='1' checked> <b>Average</b><input type='radio' name='game_skill' value='2'> <b>Hard</b><input type='radio' name='game_skill' value='3'><br><br><input type='submit' value='Start Game'><p align='center'><font color='red' size='2'><b>*NOTE*</b></font><br>You can only win up to <b>1500</b> Neopoints per day. Although,<br>if you have reached the daily limit, you can continue to play for free!</p> Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted February 12, 2007 Moderators Share Posted February 12, 2007 You are using "start_game" for the third parameter, but from the source you provided it appears it should be "game_skill". With that said the following code should work... #include <IE.au3> $oIE = _IECreate("http://www.neopets.com/games/cliffhanger/cliffhanger.phtml") $oForm = _IEFormGetCollection($oIE, 0) For $i = 1 To 3 _IEFormElementRadioSelect($oForm, $i, "game_skill") Sleep(1000) Next Link to comment Share on other sites More sharing options...
random42 Posted February 12, 2007 Author Share Posted February 12, 2007 That too gave me the same errors --> IE.au3 Warning from function _IEFormElementRadioSelect, $_IEStatus_NoMatch Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted February 12, 2007 Moderators Share Posted February 12, 2007 That too gave me the same errors --> IE.au3 Warning from function _IEFormElementRadioSelect, $_IEStatus_NoMatchThen next I would suggest verifying the form containing these radio buttons is the first form in source order. If not you will need to adjust your _IEFormGetCollection() accordingly. Link to comment Share on other sites More sharing options...
random42 Posted February 12, 2007 Author Share Posted February 12, 2007 Oh. Duh. sigh.... Thanks for pointing out the obvious. Sorry for needing it piointed out. 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