Forum > Beginners
UTF8String in a Memo (solved)
Pit:
Friendly hello to anybody,
I'm just starting with Lazarus 1.6.4. Most I work with Delphi. Now I want to analyse a program doing a html dialog. Therefore I want to copy the dialog strings to a TMemo, so I can read the dialog after it took place because of timeout.
The send and receive strings are UTF8String and containing CR, LF. May be it is very easy, but I don't see the way now. Who can show me the way?
Pit
KodeZwerg:
--- Quote from: Pit on January 12, 2023, 04:05:39 pm ---Friendly hello to anybody
--- End quote ---
Welcome to forum Pit!
--- Quote from: Pit on January 12, 2023, 04:05:39 pm ---I'm just starting with Lazarus 1.6.4.
--- End quote ---
I wonder why you not using a more recent version, anyway...
--- Quote from: Pit on January 12, 2023, 04:05:39 pm ---Therefore I want to copy the dialog strings
--- End quote ---
Can you show "how" so we can properly answer.
--- Quote from: Pit on January 12, 2023, 04:05:39 pm ---Who can show me the way?
--- End quote ---
Maybe it is as easy as
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Memo1.Lines.Add(YourDialogString);
Pit:
Hello KodeZwerg,
thank You for your answer.
"Memo1.Lines.Add(YourDialogString);" I Know this, but I get errors if I use the UTF8String like "YourDialogString". The secund point is, it contains some lines. When I try to see the Value with the tool I see this:
--- Quote ---<TSTRINGLIST> = {
<TSTRINGS> = {
<TPERSISTENT> = {
<TOBJECT> = {
_vptr$ = {
0x58fc14,
0x0}},
FOBSERVERS = $0},
FSPECIALCHARSINITED = true,
FQUOTECHAR = 34 '\"',
FDELIMITER = 44 ',',
FNAMEVALUESEPARATOR = 61 '=',
FUPDATECOUNT = 0,
FADAPTER = {
<IUNKNOWN> = {},
},
FLBS = TLBSCRLF,
FSKIPLASTLINEBREAK = false,
FSTRICTDELIMITER = false,
FLINEBREAK = #13#10},
FLIST = $2730308,
FCOUNT = 6,
FCAPACITY = 16,
FONCHANGE = $0,
FONCHANGING = $0,
FDUPLICATES = DUPIGNORE,
FCASESENSITIVE = false,
FFORCESORT = false,
FOWNSOBJECTS = false,
FSORTSTYLE = SSLNONE}
--- End quote ---
Greetings Pit
jcmontherock:
Or:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Memo1.Append(....);
Pit:
Hello jcmontherock,
thank you for your answer.
Unfortunately I Get an Error >External Sigsegv< in:
TCustomMemo:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TCustomMemo.Append(const Value: String);begin Lines.Add(Value);end;
Greetings Pit
Navigation
[0] Message Index
[#] Next page