TinyBoy Posted January 4, 2009 Share Posted January 4, 2009 (edited) I want to click on the "Apply" button in this page, but there is no name or idHere the source code:CODE<html><head><meta name="GENERATOR" content="Microsoft FrontPage 5.0"><meta name="ProgId" content="FrontPage.Editor.Document"><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>Basic Status - Initial Scan</title><script language="javascript"><!-- hide me// show me --></script></head><body><table border="0" cellspacing="0" width="100%" id="AutoNumber1" height="488" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0"> <tr> <td width="100%" height="19" colspan="2" bgcolor="#394A84"> <a href="BasicLan.htm"><img border="0" src="btn_basic_lan_status_y.gif"></a> <!-- <a href="ProductDetail.htm"><img border="0" src="btn_advanced_wan_w.gif"></a> --> <!-- <a href="techsupport.htm"><img border="0" src="btn_support_w.gif"></a> --> </td> </tr> <tr> <td width="165" height="116" align="center" style="border-left-style: none; border-left-width: medium; border-right-style: solid" bordercolor="#394A84"><a href="http://www.thomson.net"> <img border="0" src="logo_new.gif" width="154" height="106"></a></td> <td width="119%" height="116" align="left" style="border-bottom: 0px solid #C0C0C0"> <p style="margin-left: 20; margin-top: 0; margin-bottom: 0"> <span style="text-decoration: blink"> <font face="Arial" style="font-size: 20pt; font-weight:700">Basic Status</font></span></p> <p style="margin-left: 20; margin-top: 0; margin-bottom: 0"> </p> <p style="margin-left: 20; margin-top: 0; margin-bottom: 0"><b> <font face="Arial" style="font-size: 13pt">Initial Scan</font></b></p> <p style="margin-left: 20; margin-top: 0; margin-bottom: 0"> <font face="Arial" style="font-size: 11pt">To speed up the modem's first time startup, enter DS frequency and/or US channel ID here.</font></p> </td> </tr> <tr> <td width="165" height="322" align="center" valign="top" style="border-left-style: none; border-left-width: medium; border-right-style: solid" bordercolor="#394A84"> <p><a href="BasicLan.htm"><img border="0" src="btn_basic_lan_w_g.gif"></a></p> <p><a href="HardwareInfo.htm"><img border="0" src="btn_hardware_info_w_g.gif"></a></p> <p><a href="EventLog_CM.htm"><img border="0" src="btn_event_log_w_g.gif"></a></p> <p><a href="CmState.htm"><img border="0" src="btn_cm_state_w_g.gif"></a></p> <p><a href="InitialScan.htm"><img border="0" src="btn_initialscan_y.gif"></a></p> </td> <td width="82%" height="322" align="left" valign="top"> <hr><form action=/goform/InitialScan method=POST name="InitialScan"><table><tr valign=top><td><table><tr><td><strong>Initial DS frequency: </td><td><input type="text" name= "mCmInfoDsFreq1" size="12" maxlength="9" value="586000000"> </td><td><strong>Upstream Channel ID: </td><td><input type="text" name="mCmInfoUsId1" size="12" maxlength="3" value="2"></td></tr></table><br></td></tr><tr><td colspan=3 align=center><input type="Submit" value="Apply" align="MIDDLE"></td></tr></table></form></td> </tr> <tr> <td width="100%" height="19" colspan="2" bgcolor="#394A84"> </td> </tr></table><p><font size="1">© 2005 Thomson Inc. All rights reserved.</font></p></body></html>It is line 13 from the bottom.This is my code. Questionmarks shouild be reolaced by what ?$oObject = _IEGetObjByName($oIE, "????") _IEAction($oObject, "click")TIA for any support. Edited January 5, 2009 by TinyBoy Link to comment Share on other sites More sharing options...
DaleHohm Posted January 4, 2009 Share Posted January 4, 2009 First, get DebugBar (see my sig) and then see _IEFormElementGetCollection $oForm = _IEFormGetObjByName($oIE, "InitialScan") $oApply = _IEFormElementGetCollection($oForm, 2) _IEAction($oApply", "click") 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...
TinyBoy Posted January 4, 2009 Author Share Posted January 4, 2009 First, get DebugBar (see my sig) and then see _IEFormElementGetCollection$oForm = _IEFormGetObjByName($oIE, "InitialScan")$oApply = _IEFormElementGetCollection($oForm, 2)_IEAction($oApply", "click")DaleDale, thanks a lot. You are the IE hero ! Works like a charm. But I found the needle >"< in the haystack. LOL _IEAction($oApply", "click")Again, thanks a lotTinyboy 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