Lord Maim Posted May 31, 2007 Posted May 31, 2007 (edited) I'm trying to use _IEAction to press a button, but I can't seem to get an object for the button. Here's the relevant portion of the HTML code. The button that I'm trying to press is the "Save Report" button. expandcollapse popup<form name='frmPageRange' method='POST'> <DIV STYLE="margin-left: 10;"> <TABLE WIDTH=98% BORDER="0" CELLSPACING="0" CELLPADDING="0"> <TR> <TD><BR> </TD> </TR> <TR > <TD COLSPAN=2 CLASS="titlebar"> Page Range: </TD> <TD width=12 ROWSPAN=2> </TD> </TR> <TR> <TD width=5%> </TD> <TD class="label"> <p dir="ltr"> <BR> <INPUT name="pageRange" type="radio" value='a' > All <I>(53 pages)</I> <BR> <INPUT name="pageRange" type="radio" value='c' CHECKED> Current page<BR> <INPUT name="pageRange" type="radio" value='r' > Pages: <INPUT name="CustomRange" value="" onblur="changeRange(1)" onkeydown="document.forms[1].elements[2].checked=true" size="20"> <I>(Please limit range to 50 pages or less for Excel Format)</I> <BR><BR> Enter page numbers and continuous page ranges separated by commas. For example: 1,3,5-12. <!-- Esmrt Mod: Add overpagetotal = ESMRT_OVER_PAGE_TOTAL --!> <INPUT name="overpagetotal" type="hidden" value='is greater than the total number of pages'> <BR> </TD> </TR> </TABLE> </DIV> <TABLE WIDTH=96.5% BORDER="0" CELLSPACING="0" CELLPADDING="0" STYLE="margin-left: 10;"> <BR> <TR CLASS="filterGray" > <TD><Center> <DIV STYLE="margin-left: 10;"> <INPUT type=button value="View Report" class="button" onclick="applyLinkClick(0, 1)"> </DIV> </Center></TD> <TD><Center> <DIV STYLE="margin-left: 10;"> <INPUT type=button value="Save Report" class="button" onclick="applyLinkClick(1, 1)"> </DIV> </Center></TD> </TR> </TABLE> <br> </form> Edited May 31, 2007 by Lord Maim
DaleHohm Posted May 31, 2007 Posted May 31, 2007 What code have you tried? Since that element has no name attribute you'll need to use _IEFormElementGetCollection with an appropriate index. 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
Lord Maim Posted May 31, 2007 Author Posted May 31, 2007 What code have you tried? Since that element has no name attribute you'll need to use _IEFormElementGetCollection with an appropriate index.DaleThanks Dale, I didn't think of a collection. That's probably pretty rudimentary to you. :"> While I have you, I don't suppose you'd have an opinion on this...
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