Brickoneer Posted May 1, 2007 Share Posted May 1, 2007 (edited) _IEClickLinkByText still gives a undefined function error even when I have the IE.au3 included... Example: CODE#include <IE.au3> sleep(3000) $oIE = "http://www.Google.com" _IEClickLinkByText ($oIE, "Google Search") I'm trying to make an auto-clicker that clicks a button/link depending on the displayed text. (see the example) Whats wrong with it? Is my logic right? Is what I'm doing even possible? Thanks for your time! Brick Edited May 1, 2007 by Brickoneer Link to comment Share on other sites More sharing options...
evilertoaster Posted May 1, 2007 Share Posted May 1, 2007 (edited) Should be fine, id check for version/directory issues. But note that there is no "Google Search" link on that page. There is a buttom that has "Google Search" as text but that requires either a controlclick() or _IEFormSubmit() edit: or _IEAction() Edited May 1, 2007 by evilertoaster Link to comment Share on other sites More sharing options...
DaleHohm Posted May 1, 2007 Share Posted May 1, 2007 Documentation error fixed in the beta helpfile... should be _IELinkClickByText instead of _IEClickLinkByText 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...
Brickoneer Posted May 1, 2007 Author Share Posted May 1, 2007 (edited) Ok, thanks! I'll try that out. And that function won't work with buttons, right? If not then is there a function that can simulate a click to a button determined by its displayed text (I.E. Google Search) or value (I.E. "Submit")? ...Something that just doesn't require control IDs. Thanks!!! Edited May 1, 2007 by Brickoneer Link to comment Share on other sites More sharing options...
DaleHohm Posted May 1, 2007 Share Posted May 1, 2007 You'll need to understand a bit about the underlying structure of the HTML. _IELink* works on links (<a> tags) _IEForm* functions work on forms and form elements like submit buttons, _IEAction($oObject, "click") will click an arbitrary document element by passing an object that points to it. A lot of work went into the helpfile for IE.au3 and the examples included there... spend some time with them and there are also lots and lots of example scattered in the forum. 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...
Moderators big_daddy Posted May 2, 2007 Moderators Share Posted May 2, 2007 I posted an example for Google Searching yesterday. Link to comment Share on other sites More sharing options...
Brickoneer Posted May 2, 2007 Author Share Posted May 2, 2007 (edited) Ok, thanks a ton! Does anyone know if there is a way to *read* the url of the page that is currently active? All IE scripts I've seen start by loading the page themselves, thus the url is self-contained... but what if I wanted it to read the url of an open browser and be able to interact with it? [edit] I don't think I mean the _IEpropertyGet function, because doesn't that require the url of the page to know where to look? Maybe I just don't know how to use it properly... [edit 2] and I DID search for the answer, but I'm new to programming, so a LOT goes over my head. :-P Edited May 2, 2007 by Brickoneer Link to comment Share on other sites More sharing options...
DaleHohm Posted May 2, 2007 Share Posted May 2, 2007 See _IEAttach 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...
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