Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

CEF4Delphi using Cromium1.SelectAll

Post Reply
Pcrepair
Posts: 10
Joined: Tue Sep 27, 2022 5:09 pm

CEF4Delphi using Cromium1.SelectAll

Post by Pcrepair »

Good afternoon.

I am currently using

(* send CTRL-A + CTRL-C to chrome *)
Cromium1.SelectAll; // select everything on the page, we need only text for analysis.
Cromium1.ClipboardCopy; // copy to clipboard
(* ----------------------------- *)

then
PageTxt := Clipboard.AsText;

but it is undesirable to use the OS clipboard (Cromium1.ClipboardCopy) and (Clipboard.AsText)

There is Cromium1.Copy, but it is not clear where it is copying and what it is copying.

Question: how can I copy the selected(Cromium1.SelectAll) in the browser to a string variable in CEF4Delphi.

Thanks in advance for the answer
User avatar
salvadordf
Posts: 4057
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: CEF4Delphi using Cromium1.SelectAll

Post by salvadordf »

Hi,

Try using the TChromiumCore.RetrieveText procedure and implement the TChromiumCore.OnTextResultAvailable event to get the text without using the clipboard.
Post Reply