Insert_Line_at_End

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > TXT. Text-File Engine > Insert/Delete Text >

Insert_Line_at_End

TXT.itas

Previous Top Next


MiniRobotLanguage (MRL)

 

TXT.ilae

TXT.Insert_Line_at_End
Insert a Line after the specified Line in the actual TXT.-Buffer.

 

 

 

Intention

 

This command is used to append the internal Text with - for example - an Footer.

In some cases you will want to add an $crlf$ before the Footer so that its not appended to the last line.

Using this command a $crlf$ will be automatically appended to the Footer-Text on the right side.

It will also append an $crlf$ automatically to the Left side, if there is no $crlf$ after the Text.

Therefore each call to this command will add a new Line.

 

Before:

clip0363
 

$$HEA=Footer-Line

TXT.Insert_Line_at_End|$$HEA

 

After:

clip0365

 

 

Syntax

 

 

TXT.ilae|P1

TXT.Insert_Line_at_End|P1

 

 

Parameter Explanation

 

P1 - (Input,Text) Variable with Text that will be appended to the Text.

 

 

Example

 

'*****************************************************

' EXAMPLE 1: TXT.gal

'*****************************************************

' csv-File from:

' https://maloneinstitute-org.translate.goog/wef?_x_tr_sl=en&_x_tr_tl=de&_x_tr_hl=de&_x_tr_pto=wapp

'

$$TMA=#dtime#

IEM.

 VAR.$$FIA=$cmdexe$

ELS.

 'VAR.$$FIA=?exeloc\Sources\Politician.CSV

 'VAR.$$FIA=?exeloc\Sources\WEF-Members.CSV  

 VAR.$$FIA=?exeloc\Sources\4Zeiler.CSV  

 'VAR.$$FIA=?exeloc\Sources\Preise_Sample.CSV

EIF.

VAR.$$OUF=?exeloc\Result_#date#.csv

NEF.$$FIA

 $$ERR=Die Quelldatei: $$FIA$crlf$existiert nicht.

 GTO.ero

EIF.

'-----------------------------------------------------------

TXT.Load_Textfile|$$FIA|$$LIC

' Convert $LF to $crlf$ if needed.

'TXT.lfp

TXT.Get_Line_Count|$$LIC

IVV.$$LIC<5

 $$ERR=File is empty?

 GTO.ero

EIF.

PRT.$$LIC Lines loaded.

'++++++++++++++++++++++++++++++++

'++++++++++++++++++++++++++++++++

' Place your Script here

 

$$IND="D"

TXT.sort_by_column_Float|2|$$IND|;|a

 

$$HEA=Headline$crlf$

TXT.Insert_Text_at_Start|$$HEA

 

'++++++++++++++++++++++++++++++++

'++++++++++++++++++++++++++++++++

' These lines process and save the result.

'TXT.lfr

TXT.Save_File|$$OUF

EXO.$$OUF

'++++++++++++++++++++++++++++++++

'++++++++++++++++++++++++++++++++

:enx

CAL.$$TMA=#dsince#*1000|i

IVV.$$TMA>1100

 CAL.$$TMA=$$$TMA/1000

 $$TXT=Programm wird beendet nach $$TMA Sekunden.

ELS.

 $$TXT=Programm wird beendet nach $$TMA ms.

EIF.

MBT.$$TXT|Programm Ende|9|32

ENR.

'-----------------------------------------------------------

:ero

PRT.$$ERR

GTO.enx

 

 

Remarks

 

-

 

Limitations:

 

-

 

 

See also:

 

  TXT.Load Textfile

  TXT.Clear

  TXT.From_Var

  TXT.Load_pure_Text

  TXT.Get_pure_Text

  FIL.Generate numbered Name

  FIL.Move numbered File

  ATF - Append-to-File

  CFF. - Copy-From-File

  CTF - Copy-To-File

  COP. - Copy File

  TXT.Get_Filename

  TXT.Get_Lenght

  TXT.To_Var_and_Clear

    GLC. - Get-Line-Count

    TXT.Get_Line

    IEF. / NEF. - If - exist - File

    LFF - Line-From-File

    WFF. - Wait-For-File

    REN. - Rename File/Dir