Solved

twebbrowser save text, then remove link anchor text

Posted on 2006-11-23
4
392 Views
Last Modified: 2012-05-05
Hi all,

Does anybody know how to save the innertext of a website with twebbrowser to a memo, then get the anchor text of all the links from twebbrowser, then remove all instances of each anchor text from the memo.

Thanks
0
Comment
Question by:zattz
  • 2
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
bernani earned 500 total points
ID: 18006458
Hi,

There is good package (freeware) at http://www.bsalsa.com/downloads.html

Download  one of the demo at http://www.bsalsa.com/Downloads/EmbeddedWBDemo_SC.zip

and you'll have all the required procedures to load/save/edit/see ... :

Page Source Html As Strings
Page Source Text As Strings
View Page Links As A List

...

procedure TfrmMain.PageSourceHtmlAsStrings1Click(Sender: TObject);
begin
   UpdateEditor;
   EmbeddedWB1.ViewPageSourceHtmlToStrings(RichEditWB1.Lines);
   if RichEditWB1.HighlightHTML then
   RichEditWB1.DoHighlightHTML;
end;

procedure TfrmMain.PageSourceTextAsStrings1Click(Sender: TObject);
begin
   UpdateEditor;
   EmbeddedWB1.ViewPageSourceTextToStrings(RichEditWB1.Lines);
end;

procedure TfrmMain.ViewPageLinksAsAList1Click(Sender: TObject);
begin
   UpdateEditor;
   EmbeddedWB1.ViewPageLinksToStrings(RichEditWB1.Lines);
end;

procedure TfrmMain.ViewPageImagesAsAList1Click(Sender: TObject);
begin
   UpdateEditor;
   EmbeddedWB1.ViewPageImagesToStrings(RichEditWB1.Lines);
end;

procedure TfrmMain.ViewPageFieldsAsAList1Click(Sender: TObject);
begin
   UpdateEditor;
   EmbeddedWB1.ViewPageFieldsToStrings(RichEditWB1.Lines);
end;

0
 

Author Comment

by:zattz
ID: 18006508
Unfortunatly there isnt a VCL.NET version
0
 
LVL 9

Expert Comment

by:bernani
ID: 18006589

Hi,

I didn't know your question was VCL.NET related.

I've uninstalled my D2005 version, so I can't check if the procedures can be adapted to a VCL.NET environnement.

I'll see if I can anyway find sth.  





0
 

Author Comment

by:zattz
ID: 18007153
I'm trying it out in win32 and it only lists the actual web links, not the anchor text
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question