Shizu Posted April 3, 2017 Posted April 3, 2017 Hello. I have small problem. I want to navigate internet explorer using <IE.au3> to click the button. I do not know what's the href or any other destination information. I just know how the button will be called for example : I want IE to open any site, then click the link called "NEW ARTICLES"(not a graphic button, just a hyperlink). Is it possible to do something like this ?
Moderators JLogan3o13 Posted April 3, 2017 Moderators Posted April 3, 2017 @Shizu welcome to the forum. You are not going to be able to "open any site" and click the button the same, as the button is not going to be coded exactly the same on every site. Your best bet is to look through the help file and the _IE* functions, try the examples contained therein on a specific website you would like to automate. Then, if you run into trouble, post your code and we will do our best to assist. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Subz Posted April 4, 2017 Posted April 4, 2017 Here is a really basic example to get you started: #include <IE.au3> Local $sURL = "https://www.autoitscript.com/autoit3/docs/libfunctions/_IELinkGetCollection.htm" Local $oIE = _IECreate($sURL) Local $oLinks = _IELinkGetCollection($oIE) For $oLink In $oLinks If StringStripWS($oLink.InnerText, 7) = "_IEAction()" Then _IEAction($oLink, "Click") ExitLoop EndIf Next 232showtime 1
Shizu Posted April 4, 2017 Author Posted April 4, 2017 (edited) For example: I want to open site ebay(I know how to do it) and then click the hyperlink Brighten Up (http://imgur.com/a/U65Yo). I do not want to use the source of it Quote <a href="http://www.ebay.com/cln/decouverte/brighten-up/392994973019" _sp="p2057337.m2572.l4724" title="Collection of products named Brighten Up">Brighten Up</a> . I want autoit to search for the string Brighten Up and then save it to variable or click it directly. Is it possible ? Any specific command of _IE ? Thanks for replies. Edited April 4, 2017 by Shizu
Subz Posted April 4, 2017 Posted April 4, 2017 The example I posted does exactly this, did you test, the example above goes to the url "https://www.autoitscript.com/autoit3/docs/libfunctions/_IELinkGetCollection.htm" It then searches all links for the word "_IEAction": ;~ Search for the word "_IEAction()" If StringStripWS($oLink.InnerText, 7) = "_IEAction()" Then It then clicks that link
mikell Posted April 5, 2017 Posted April 5, 2017 Following JLogan's recommendations you would have found in the helpfile something named _IELinkClickByText ...
Shizu Posted April 7, 2017 Author Posted April 7, 2017 Thank you guys, I'll try it soon. If I have any more questions I'll ask you in this topic, so do not close it if possible. Cheers.
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