I want to delete empty lines from a text in e.g. a variable.
The text looks like:
Code: Select all
14,108,114,248,387
34
31
350
250
Code: Select all
14,108,114,248,387
34
31
350
250
Code: Select all
14,108,114,248,387
34
31
350
250
Code: Select all
14,108,114,248,387
34
31
350
250
Code: Select all
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|444033236
Comment=STRINGLIST
ContinueOnError=INTEGER|0
DisableOnError=INTEGER|0
DoNotStopWhenShutdown=INTEGER|0
ExternalName=STRING|"Task1464"
Hide=INTEGER|0
ID=INTEGER|-1755582636
LogOnAsUser=INTEGER|1
Name=STRING|"remove empty lines from text"
OnErrorTaskID=INTEGER|0
Priority=INTEGER|3
RestrictRESTAPIAccess=INTEGER|0
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
StepPause=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=FOLDER
Action8=FOLDER
Action9=FOLDER
[Actions\Action1]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""oldText"" with value ""14,108,114,248,387"""
Params=FOLDER
[Actions\Action1\Params]
_rt_variables_produced=STRING|"oldText"
expand=STRING|"0"
linecount=STRING|"7"
varname=STRING|"oldText"
varvalue=STRING|"14,108,114,248,387"
varvalue00000002=STRING|"34"
varvalue00000004=STRING|"31"
varvalue00000005=STRING|"350"
varvalue00000006=STRING|"250"
[Actions\Action2]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""NewText"" with value """""
Params=FOLDER
[Actions\Action2\Params]
_rt_variables_produced=STRING|"NewText"
expand=STRING|"0"
linecount=STRING|"0"
varname=STRING|"NewText"
[Actions\Action3]
ActionID=STRING|"A_LOOP_TEXT"
Enabled=INTEGER|-1
Name=STRING|"Text Loop"
Params=FOLDER
[Actions\Action3\Params]
_rt_variables_produced=STRING|"line"
delimiter_no=STRING|"0"
destvar=STRING|"line"
line0=STRING|"{oldText}"
linecount=STRING|"1"
quote_char=STRING|"0"
sourcetext=STRING|"1"
strict_delim=STRING|"1"
[Actions\Action4]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER
[Actions\Action4\Params]
case=STRING|"0"
connection=STRING|"0"
count=STRING|"1"
operator=STRING|"8"
type=STRING|"0"
value1=STRING|"{line}"
[Actions\Action5]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""NewText"" with value ""{NewText}{line}{EOL}"""
Params=FOLDER
[Actions\Action5\Params]
_rt_variables_produced=STRING|"NewText"
expand=STRING|"1"
linecount=STRING|"1"
varname=STRING|"NewText"
varvalue=STRING|"{NewText}{line}{EOL}"
[Actions\Action6]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"
[Actions\Action7]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
[Actions\Action8]
ActionID=STRING|"A_STR_TRIM"
Enabled=INTEGER|-1
Name=STRING|"STR Trim"
Params=FOLDER
[Actions\Action8\Params]
_rt_variables_produced=STRING|"NewText"
custom=STRING|"0"
eol=STRING|"1"
lead=STRING|"1"
source=STRING|"{NewText}"
spaces=STRING|"0"
tabs=STRING|"0"
trailing=STRING|"1"
variable=STRING|"NewText"
[Actions\Action9]
ActionID=STRING|"A_DIALOG_SHOWTEXT"
Enabled=INTEGER|-1
Name=STRING|"Show Text"
Params=FOLDER
[Actions\Action9\Params]
autoclose=STRING|"0"
fromfile=STRING|"1"
line00000000=STRING|"Old text:"
line00000001=STRING|"****************"
line00000002=STRING|"{oldText}"
line00000003=STRING|"****************"
line00000005=STRING|"New text:"
line00000006=STRING|"****************"
line00000007=STRING|"{NewText}"
line00000008=STRING|"****************"
linecount=STRING|"9"
timeout=STRING|"10"