Rickname Posted February 2, 2014 Posted February 2, 2014 (edited) How can I take the title of a link, just like the browsers does ? For example , as you know, all the tabs from the browser, have a name, based on what link is opened in them. So how can I take that name of a link with AutoIT and without the help of the browser ? Edited February 2, 2014 by Rickname
JohnOne Posted February 2, 2014 Posted February 2, 2014 Post an example of what you regard as a link. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Rickname Posted February 2, 2014 Author Posted February 2, 2014 (edited) Yes, the examples are the best methods to explain it better : I uploaded the picture : That titles I want to extract, NOT EXACTLY THIS ONES , but any title from any link ! Edited February 2, 2014 by Rickname
Danp2 Posted February 2, 2014 Posted February 2, 2014 Given a URL, you could use the WinHTTP UDF to read the web page and then extract the title from the returned data. Rickname 1 Latest Webdriver UDF Release Webdriver Wiki FAQs
JohnOne Posted February 2, 2014 Posted February 2, 2014 I believe that info to be in the header. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Gianni Posted February 2, 2014 Posted February 2, 2014 (edited) have a look to all the _IE* function in the help maybe the _IELinkGetCollection function can be of help for your case when you have a reference to the link, use the .href property to "extract" the url of that link (see the example in the help) EDIT: sorry, misunderstood your question what you need should be the ".document.title" property if you use IE try this as example: #include <IE.au3> $oIE = _IECreate("www.autoitscript.com") MsgBox(0,"",$oIE.document.title) Edited February 2, 2014 by PincoPanco Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
Solution Rickname Posted February 2, 2014 Author Solution Posted February 2, 2014 Great Information Danp2 ! I did what you said, and it worked : So you just need to get the source of the webpage via this function : _IEDocReadHTML() , then extract the text that is enclosed between the <title> </title> tags ! Thats the name of the link ! Thankyou so much !
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