Hi David,
I will be writing an app, almost complete, that extracts all links on a
page including there display text.
There are 2 ways they get displaced, between link tags and as a title
inside the starting link tag...
There are other text which can be extracted from things such as header tags
and paragraph tags.
The links are all started with: href="linkpath" for all HTML stuff.
the Object models lets you know there is a link but no extraction there.
So, busy now, but will get back later on it.
I am not sure if the DOM is in the tool kit but got busy on something else
at the moment.
Bruce
Sent: Monday, February 03, 2014 7:51 AM
Subject: Retrieving a link from the BrowseMode buffer
Think I got stuck here, and wonder if someone could give me a bit of
first-aid :)
I have the following code:
Dim BMBuffer: Set BMBuffer = BrowseMode
Dim BMLineNumber: BMLineNumber = BMBuffer.CursorLine
Dim BMLine: Set BMLine = BMBuffer.Lines( BMLineNumber)
So far, things work well, and I can get it to speak the line number, and the
text of the line. Next, I check on the IsLink boolean, to make sure I am on a
link in the buffer. Now, how do I retrieve the actual link - that is, the
"http" blah-blah stuff - from my finding?
OK, I read in the reference material for WE, and find the DOMNode property.
So, I do something like:
Dim BMNode: Set BMNode = BMLine.DOMNode
If I now test on the TypeName of the BMNode variable, whenever focusing a
link, I get the message that it is
Nothing,
when I am working in Firefox, and in Internet Explorer, I get an object of
the type
DispHtmlTextNode.
Not really sure, why it would return an empty object, when in Firefox, but
recognize things well enough in Internet Explorer. Well, computers have their
own kind of fun.
Anyway, my real trouble here is, how can I make the app tell me the actual
"http" stuff for the focused Link, when in BrowseMode? What is the correct
syntax here? Any ideas are welcome. Thanks all of you...
---
This email is free from viruses and malware because avast! Antivirus protection
is active.
http://www.avast.com