Page 1 of 1

multiline string variable

Posted: Thu Oct 21, 2021 1:30 pm
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"?

Re: multiline string variable

Posted: Thu Oct 21, 2021 4:20 pm
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.

Re: multiline string variable

Posted: Fri Oct 22, 2021 9:01 am
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.