Teltech Posted January 5, 2009 Share Posted January 5, 2009 Hi all, I'm having a doozy of a time over here i'm hoping some of you will be able to help me out. I have a site that has three Frames. The three frames are called "menu_frame", "content_frame", "status_bar" In the first frame there's a form and only one form, (It doesn't have a name!). In that frame there are 10 buttons (each of those don't have a name!) What I'm trying to do is click on the first button in that form. I'm having a heck of a time getting autoit to click on it. CODE #include <IE.au3> #EndRegion --- IE-Builder generated code End --- #Region --- IE-Builder generated code Start --- $sUrl = "xxxxx" $oIE = _IECreate($sUrl, 1) $oFrame1 = _IEFrameGetObjByName($oIE, "nps_splash_enter_button") _IEImgClick($oIE, "nps_splash_enter_button" , "name") ;Get the form Login Form information $oForm = _IEFormGetObjByName ($oIE, "login_form") ;Get the dropdown information $oSelect = _IEFormElementGetObjByName ($oForm, "nps_profile") _IEFormElementOptionselect ($oSelect, 1, 0, "byIndex") $oApply = _IEFormElementGetCollection($oForm, 1) _IEAction($oApply , "click") $oFrame2 = _IEFrameGetObjByName ($oIE, "menu_frame") $oNetwork = _IEFormElementGetCollection($oFrame2, 1) _IEAction($Network , "click") I'm able to log in, select a profile selection and then continue. But this is where i'm stuck, I'm pretty new th the IE UDF so I don't know if it's a problem with how I'm choosing my frames, or if it's because autoit doesn't know how to locate the frame. Here's a snippet of code of the button. <INPUT class=main-button-selected id=mainbutton0 onmouseover="highlight_main_button(1, this)" onclick="activate_sub_menu('networks', 0, 'list_networks(0)')" onmouseout="highlight_main_button(0, this)" type=button value=Networks> <FORM><TABLE id=main_menu style="MARGIN: 0px" cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR id=main_menu0> <TD width=80><INPUT class=main-button-selected id=mainbutton0 onmouseover="highlight_main_button(1, this)" onclick="activate_sub_menu('networks', 0, 'list_networks(0)')" onmouseout="highlight_main_button(0, this)" type=button value=Networks></TD> <TD> </TD></TR> </TBODY> </FORM> Can someone give me a boot in the right direction? The form contains a table, which is where the buttons are, i've removed the rest of the cells to shorten the code lenght. should I be looking at the table id? Any help would be appreciated. Thanks, Link to comment Share on other sites More sharing options...
DaleHohm Posted January 5, 2009 Share Posted January 5, 2009 Please read the "Remarks" section of the functions you would use if they did have names... 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...
Teltech Posted January 5, 2009 Author Share Posted January 5, 2009 Use the tag's!... my gosh, why didn't I think of that before.Thanks Dale!Please read the "Remarks" section of the functions you would use if they did have names...Dale 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