multiline string variable

Use this forum to request features. Maybe you'll get lucky!
Post Reply
User avatar
Vladimir
Posts: 21
Joined: Fri Mar 27, 2020 1:38 pm

multiline string variable

Post by Vladimir »

Hello.
Is it possible to put the content of a string variable with multiline text to "%s_success% variable"?

Version 1.1 allowed to get results of some analyze process reading job "result" from "http://localhost:65445/api/v2/history " as miltiline text.
After update to 1.2 i get the text without linefeeds.

It's not trouble, but maybe there is some trick to get around?
Maybe I need to insert "\u000A" for replacement to "\r\n" when decoding the content of "result"?
Attachments
Miltiline_textfile.txt
(62 Bytes) Downloaded 335 times
MultiLine s_success.json
(1.93 KiB) Downloaded 339 times
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: multiline string variable

Post by emcodem »

Hey again Vladimir,

yeah unfortunately as of now you cannot put newlines to the s_success message, it is intended to be a one-liner that is displayed on the status monitor and we strip out \r\n intentionally as we use \r\n to separate the jobs in /monitor/log.txt.
I'd just replace \r\n by something that i can replace again in my program when asking the history api, for example
set s_sucess to:

Code: Select all

$replace("%s_temp_str_var%",@CRLF,"@")
and later on, replace all @ characters by \n again. By the way, @CRLF is an autoit variable for environment newline, which is typically \r\n.
Typically i'd use JSON or XML format for exchanging data like that.
emcodem, wrapping since 2009 you got the rhyme?
User avatar
Vladimir
Posts: 21
Joined: Fri Mar 27, 2020 1:38 pm

Re: multiline string variable

Post by Vladimir »

Thank you emcodem,

you explained the situation clearly enough. I suspected that I would have to bypass the trouble using this method, but was not sure.

Thanks a lot.
Post Reply