cad29 Posted October 13, 2006 Share Posted October 13, 2006 Hi want im creating a script that will automatically click the one that says on the website ClickHere but it doesnt work heres the source code <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252"> <title></title> <LINK rel='stylesheet' type='text/css' href='../../bin/files/stylesheet.css' > <script LANGUAGE="Javascript" SRC="../..//files/shared_literals.js"></script> <script language="Javascript" SRC="../../bin/files/tpl_pr_toolbar.js"></script> </head> <body onunload="JS_closeChildWindwos()"> <form name="toolbarform" id="toolbarform" method="POST"> <TABLE width="100%" cellpadding="1" cellspacing="0" border="0"> <tr> <TD bgcolor="#6666ff" width= "15%"> </TD> </tr> </table> <a href="java script:showWindow('Clickhere','clickhere.asp','Clickhere')" onmouseover="imagechange('clickhere','../images/clickhere.gif');" onmouseout="imagechange('clickhere','../images/clickhere.gif');"><img name="clickhere" alt="Click Here" border="0" src="../images/clickhere.gif"></a> <a href="java script:showWindow('Close','close.asp','close')" onmouseover="imagechange('closeImg','../images/closeo.gif');" src="../images/edit.gif" ></a> <!-- Tag for saving application state of Asset Tracker--> <!-- Tag for saving application state of Procurement Interface--> </form> </body> </html> This is the script that I tried $oIE = _IECreate ("www.examples.com",1) $oForm = _IEFormGetObjByName ($oIE, "toolbarform") _IEAction ($oForm, "click") i tried this one aswell _IEFormSubmit ($oForm) it has a result of IE.au3 Warning from function _IEFormGetObjByName, $_IEStatus_NoMatch i tried the IEFrame and doesnt give me an error but it doesnt click the one that says click here i tried the image aswell $oIE = _IECreate ("www.example.com",1) _IEImgClick ($oIE, "Click Here", "alt") i tried this one too but still it doesnt work $oIE = _IECreate ("www.example.com",1) _IEFormImageClick ($oIE,"Click Here "images/clickhere.gif") i even tried to used the IENavigate _IENavigate($oIE,"java script:showWindow('Click Here','clickhere.asp','click')") (when i do this nativate theres no error but ti doesnt do anything it doesnot click automatically) Please help and thanks a lot in advanced Link to comment Share on other sites More sharing options...
DaleHohm Posted October 13, 2006 Share Posted October 13, 2006 What you are trying to click on may be inside the <form></form> tags, but it is not a form element. Rather it is an IMG insde an A (hyperlink anchor). Based on what I see you should be able to use: _IEImgClick($oIE, "clickhere", "byName") 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...
cad29 Posted October 16, 2006 Author Share Posted October 16, 2006 Hi Dale thanks for the help but i tried it doesnt work it has an error of --> IE.au3 Warning from function _IEImgClick, $_IEStatus_NoMatch _IEImgClick($oIE, "clickhere", "clickhere.gif") i tried the alternative too _IEImgClick($oIE, "clickhere", "alt") thanks for he help again Link to comment Share on other sites More sharing options...
cad29 Posted October 16, 2006 Author Share Posted October 16, 2006 Need help for this one please thanks Link to comment Share on other sites More sharing options...
DaleHohm Posted October 16, 2006 Share Posted October 16, 2006 Hi Dale thanks for the help but i tried it doesnt work it has an error of --> IE.au3 Warning from function _IEImgClick, $_IEStatus_NoMatch_IEImgClick($oIE, "clickhere", "clickhere.gif")i tried the alternative too_IEImgClick($oIE, "clickhere", "alt")thanks for he help againIf the HTML code you posted is correct, the example I gave you should work, unless and likely your image is in a Frame instead of in the main document. Please see _IEFrame*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...
cad29 Posted October 16, 2006 Author Share Posted October 16, 2006 Dale thanks for the immediate reply i tried to used the Form and i just replaced that one with the correct name but it doesnt work.. #include <IE.au3> $oIE = _IE_Example ("form") _IEFormImageClick ($oIE, "AutoIt Homepage", "alt") ; ******************************************************* ; Example 2 - Open a browser with the form example, click on the <input type=image> ; form element with matching img source URL (sub-string) ; ******************************************************* ; #include <IE.au3> $oIE = _IE_Example ("form") _IEFormImageClick ($oIE, "autoit_6_240x100.jpg", "src") ; ******************************************************* ; Example 3 - Open a browser with the form example, click on the ; <input type=image> form element with matching name ; ******************************************************* ; #include <IE.au3> $oIE = _IE_Example ("form") _IEFormImageClick ($oIE, "imageExample", "name") Link to comment Share on other sites More sharing options...
DaleHohm Posted October 16, 2006 Share Posted October 16, 2006 Please see my previous reply:unless and likely your image is in a Frame instead of in the main document. Please see _IEFrame*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...
cad29 Posted October 16, 2006 Author Share Posted October 16, 2006 Hi Dale I tried to run the iframe collection program the one that has in the example and it gives me 4 frame namely checkbar.asp,user.asp ,welcome.asp and htmlblank.asp ' #include <IE.au3> $oIE = _IE_Example ("iframe") $oFrame = _IEFrameGetObjByName ($oIE, "iFrameTwo") _IEBodyWriteHTML ($oFrame, "Hello <b>iFrame!</b>") _IELoadWait ($oFrame) can you please give me an example how to make a script on this one on a frame i tried to used specially this _IEFrameGetObjByName ($oIE, "iFrameTwo") i dont know what object im going to refer into thnx Link to comment Share on other sites More sharing options...
DaleHohm Posted October 16, 2006 Share Posted October 16, 2006 Something like this: $oIE = _IECreate ("www.example.com") $oFrame = _IEFrameGetObjByName ($oIE, "iFrameTwo") _IEImgClick($oFrame, "clickhere", "byName") 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...
cad29 Posted October 17, 2006 Author Share Posted October 17, 2006 Hi Dale great thanks for the help it work your genius I have another thing dale i want that even the "www.example.com" is being minized still my script will able to click the click here because right now i used $oIE =_IECreate("www.example.com",1) but this script will automatically activate the page i want that when this site is already present then it will still able to click with it even do it is being minized and the other thing aswell when i "click here" it display another window like a pop when i check the window au3info it gives me a title of Title:PLEASE SELECT OPTION is it possible to used the title instead of the actual website? Example right now in the autoit website forum is :http://www.autoitscript.com/forum/index.php?act=post&do=reply_post&f=2&t=34472 but when you check the title window:AutoIt Forums -> Replying in _IEForm and Javascript help - Mozilla Firefox so is it possible to used the title window instead of the actual website? without using the winactivate because right now my script goes with the website $oIE = _IECreate ("www.example.com") I want it instead of the website add it goes with the window the title window for that www.example.com is Title"Things need to be done" thanks for the help dale i do appreciated it Link to comment Share on other sites More sharing options...
cad29 Posted October 17, 2006 Author Share Posted October 17, 2006 Please anyone can help me thanks Link to comment Share on other sites More sharing options...
DaleHohm Posted October 17, 2006 Share Posted October 17, 2006 I'm not sure I understand, but I think you want to look at _IEAttach 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...
cad29 Posted October 17, 2006 Author Share Posted October 17, 2006 Yup thats what im looking for it works thank you so much dale your the best it work again 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