Text output / string #S

The group includes commands to display simple, formatted and self-changing strings. In addition, there is the possibility to place texts using edit boxes (one line inputs) and string boxes (multiple lines output).



Simple strings

Place string

(String Static Place)

#SSP

Obj-ID, TextStyle-No., x, y, Anchor, "Text"

Change string

(String Static Change)

#SSC

Obj-ID, "Text"

Formatted strings

Place formatted string

(String Formated Place)

#SFP

Obj-ID, TextStyle-No., x, y, Anchor, "Formatted string"; Value1, Value2, ...., ValueN, Value1,...,ValueN,...

Change parameter of formatted string

(String Formated Change)

#SFC

Obj-ID, Value1, Value2, ...., ValueN

Convert string to formatted string

(String Formated Format)

#SFF

Obj-ID, "Formatted string"; Value1, Value2, ...., ValueN

Auto update formatted strings

Place formatted string with Auto Update

(String Automatic Place)

#SAP

Obj-ID, TextStyle-No., x, y, Anchor, "Formatted string";  (Calculation), Value1...., ValueN

Change calculation from formatted string with Auto Update

(String Automatic Change)

#SAC

Obj-ID, (Calculation)

Convert string to formatted string with Auto Update

(String Automatic Format)

#SAF

Obj-ID, "Formatted string"; (Calculation), Value1,...., ValueN

Date / time strings

Place the string with the date / time

(String Date Place)

#SDP

Obj-ID, TextStyle-No., x, y, Anchor, "Dateformat"; date (act. time); 1/100sec

Change date / time in string

(String Date Change)

#SDC

Obj-ID, date (act. time); 1/100sec

Convert string to string with date / time

(String Date Format)

#SDF

Obj-ID, "Dateformat"; date (act. time); 1/100sec

EditBox

Place EditBox

(String Edit Place)

#SEP

Obj-ID, DrawStyle-No., x, y, Anchor, Width, Height, Radius, TextStyle-No., BorderX(0), BorderY(0)

Define default string for EditBox

(String Edit Default)

#SED

Obj-ID, "Default text"; "Default text (Obj-ID+1)"; "Default text (Obj-ID+2)";....

Send strings / codes to EditBox

(String Edit Codes)

#SEC

Obj-ID, "String";  "String (Obj-ID+1)"; "String (Obj-ID+2)";....

Connect EditBox with keyboard

(String Edit Keyboard)

#SEK

Keyboard-ID, Obj-ID, Obj-ID+1, ...

Activate/deactivate EditBox

(String Edit Activate)

#SEA

Obj-ID(0), Keyboard-ID(0)

Define valid character codes

(String Edit Range)

#SER

Obj-ID, Codes

Define input mask

(String Edit Mask)

#SEM

Obj-ID, "Input mask"; Placeholder

Define password mode

(String Edit Wildcard)

#SEW

Obj-ID, Wildcardcode

StringBox

Place StringBox

(String Box Place)

#SBP

Obj-ID, x, y, Anchor, Width, Height, Radius, ScrollbarWidth(text height)

Define styles for StringBox

(String Box Styles)

#SBS

Obj-ID, DrawStyle-No. Background, DrawStyle-No. Scrollbar, TextStyle-No., BorderX(0), BorderY(0), AutoWrap(1)

Add paragraph

(String Box Add)

#SBA

Obj-ID, Paragraph, "Text";  "Text (Line+1)"; "Text (Line+2)";....

Remove paragraph

(String Box Delete)

#SBD

Obj-ID, Paragraph, Line1. ...

Add text file

(String Box File)

#SBF

Obj-ID, Paragraph, <Textfile>

Jump to line

(String Box Offset)

#SBO

Obj-ID, Line, Time (0), ActionCurve-No (0)

Simple strings

This group includes commands for placing and changing simple strings.


Place string

#SSP

Obj-ID, TextStyle-No., x, y, Anchor, "Text"

The command places a string with the given Anchor at the position  x, y. The appearance of the character string is determined with the TextStyle (TextStyle-No.). This is explained in more detail in the section TextStyle.


...

#SSP 1,1,20,20,7,"Hello World";

...


Change string

#SSC

Obj-ID, "Text"

The command changes an existing string. Other object properties (position, style, etc.) remain unchanged.


...

#SSC 1,"New String";

...


Formatted string

This group contains commands for placing and changing formatted strings.


Place formatted string

#SFP

Obj-ID, TextStyle-No., x, y, Anchor, "Formatted string"; Value1, Value2, ...., ValueN, Value1,...,ValueN,...

The command places a formatted string with the given Anchor at the position x, y. The appearance of the character string is determined with the TextStyle (TextStyle-No.). This is explained in more detail in the subsection TextStyle. If the variable set repeats, the format string is used again. The structure is described in more detail in the subsection Formatted string.

...

#SFP 1,1,20,20,7,"Formatstring %d"; 42

...


Change parameter of formatted string

#SFC

Obj-ID, Value1, Value2, ...., ValueN

This command changes the parameters of a formatted string. The object properties (position, style, etc.) remain unchanged.

...

#SFC 1,25

...


Convert string to formatted string

#SFF

Obj-ID, "Formatted string"; (Calculation), Value1,...., ValueN

An existing string is changed to a formatted string. Other object properties (position, style, etc.) remain unchanged. The structure is explained in more detail in the section Formatted string.

...

#SFF 1,"Hello World %d"; 25

...


Auto update formatted strings


Place formatted string with Auto Update

#SAP

Obj-ID, TextStyle-No., x, y, Anchor, "Formatted string";  (Calculation), Value1...., ValueN

The command places a formatted string with the given Anchor at the position x, y. The appearance of the character string is determined with the TextStyle (TextStyle-No.). The text-structure is described in more detail in the section Formatted string. The output is renewed as soon as the Calculation changes. If the other parameters (value1, ... valueN) are also calculations, their value is recalculated, too (only if the value of the first calculation changes).

...

#SAP 1,1,20,20,7,"Analog %d";(analog(0))

...


Change calculation from formatted string with Auto Update

#SAC

Obj-ID, (Calculation)

The command changes the calculation of a formatted string with Auto Update. The new calculation only determines the time when the string is output again, without influencing the displayed values / calculation.


...

#SAP 1,1,20,20,7,"Zufallswert %d";(rand())  /**Ausgabe eines Zufallswertes

#SAC 1,(time())                             /**Änderung des Zufallswertes nur alle Sekunde

...




Convert string to formatted string with Auto Update

#SAF

Obj-ID, "Formatted string"; (Calculation), Value1,...., ValueN

An existing character string is changed to a formatted character string with Auto Update function. Other object properties (position, style, etc.) remain unchanged. The structure is explained in more detail in the subsection Formatted string. The string renews the output as soon as the Calculation changes. If the other parameters (value1, ... valueN) are also calculations, their value is recalculatedtoo  (only if the value of the first calculation changes).


...

#SAF 1,"Analog %d";(analog(0))

...


Date / time strings


Place string with date / time

#SDP

Obj-ID, TextStyle-No., x, y, Anchor, "Dateformat"; date (act. time); 1/100sec

The command places a character string with date / time and the given Anchor at the position x, y. The way of presentation is based on the date format. The structure is described in more detail in the sub-chapterDate formats. If the current time is displayed, the output of the current time adapts automatically. The appearance of the character string is determined with the TextStyle (TextStyle-No.). This is explained in more detail in the subsection TextStyle.

...

#SDP 1,1,20,20,7,"%D.%M.%Y|%h:%m:%s";

...


Change date / time in string

#SDC

Obj-ID, date (act. time); 1/100sec

The displayed time of the date format is changed. Other object properties (position, style, etc.) remain unchanged. The structure is described in more detail in the sub-chapter Date formats.


...

#SDC 1,(datetime(14,36,20,24,09,2031))

...

Convert string to string with date / time

#SDF

Obj-ID, "Dateformat"; date (act. time); 1/100sec

An existing string is changed to a string with date / time. Other object properties (position, style, etc.) remain unchanged. The structure is described in more detail in the sub-chapter Date formats.

...

#SDF 1,"%h:%m:%s";

...


EditBox

EditBoxes are used for entering characters. The input is usually made using a keyboard. The definition of a keyboard is explained in more detail in the Keyboard sub-chapter. Entries can also be made by command (see #SEC). The box must be connected to a keyboard, that entries via keyboard end up in the EditBox (see #SEK). To receive values the EditBox must be active. This can be done either by command (#SEA) or by touch (#TID). In the following example an EditBox is placed, connected to a keyboard and activated by touch. The definition of the keyboard is not included.

...

#SEP 1,1,20,20,7,250,70,10,1,2,2

#SEK 2,1

#TID 1,1

...


Place EditBox

#SEP

Obj-ID, DrawStyle-No., x, y, Anchor, Width, Height, Radius, TextStyle-No., BorderX(0), BorderY(0)

The command places an EditBox with the given Anchor at position x, y with a defined Width and Height. The DrawStyle defines the appearance of the background of the EditBox (DrawStyle No.). The structure is described in more detail in the DrawStyle subsection. The parameter Radius specifies the corner rounding. The appearance of the character string is determined with the TextStyle (TextStyle-No.). This is explained in more detail in the TextStyle subsection. With the two optional parameters (BorderX and BorderY) the distance of the text to the edge of the box can be specified.

...

#SEP 1,1,20,20,7,250,70,10,1,2,2

...


Define default string for EditBox

#SED

Obj-ID, "Default text"; "Default text (Obj-ID+1)"; "Default text (Obj-ID+2)";....

A standard text is defined. Further strings indicate the default string for further EditBoxes with the object IDs Obj-ID+1, ..., Obj-ID+n.

...

#SED 1,"Default";

...


Send strings / codes to EditBox

#SEC

Obj-ID, "String";  "String (Obj-ID+1)"; "String (Obj-ID+2)";....

The command can be used to send strings and codes to the EditBox. Additional strings are sent to the edit boxes with the object IDs Obj-ID + 1, ..., Obj-ID + n.

...

#SEC 1,"Hello"$21;

...


Connect EditBox with keyboard

#SEK

Keyboard-ID, Obj-ID, Obj-ID+1, ...

This command connects a keyboard (Keyboard-ID) with one or more EditBoxes (Obj-ID)


Activate/deactivate EditBox

#SEA

Obj-ID(0), Keyboard-ID(0)

The command activates or deactivates EditBoxes.


Activate:


Obj-ID

Object ID of the edit box

Keyboard-ID

Not necessary


Deactivate:

Obj-ID

0


Keyboard-ID

0

all edit boxes are deactivated

Keyboard-ID

all edit boxes assigned to the keyboard are deactivated


Define valid character codes (from V1.2)

#SER

Obj-ID, Codes

The command specifies valid entries that are displayed in the EditBox. Valid characters (codes) are separated by commas or specified as a range string (e.g. "0-9A-Za-z", which allows all digits and the Latin alphabet).

...

#SER 1,"A-Za-z,4"

#SEC 1,"Value 42";

...


Define input mask (from V1.2)

#SEM

Obj-ID, "Input mask"; Placeholder

An input mask is defined for the EditBox. The Placeholder parameter defines the visible character code (e.g. '_'). Following masks are possible:

Type

Mask

Example

Integer

%Maximum valueI or %from;toI

"%42I"; or "%10;25I";

Float

%Maximum valueF or %from;toF

"%23.4I"; or "%0.5;7.9I";

ASCII

%character countA

"%4A" (max. 4 characters from the ASCII character set)

Unicode

%character countU

"%4U" (max. 4 characters from the Unicode area)

Range

%character countR

"%4R" (max. 4 characters from the range #SER)


...

#SEM 1,"%42I";?_

...

Define password mode (from V1.2)

#SEW

Obj-ID, Wildcardcode

The replacement character (Wildcardcode) is displayed instead of the characters entered.


...

#SEW 1,$25cf

...


StringBox

StringBoxes can display large amounts of text. Additional text can be added or deleted at any time. Every newly added text (#SBA, #SBF) is inserted as a new paragraph. If the AutoWrap (see #SBS) function is deactivated, the paragraph number is the same as the line number. Otherwise, the two can differ. However, there are calculations to convert them into each other. In the following example, a StringBox is created and one paragraph is added.


...

#SBP 1,20,20,7,250,200,10

#SBS 1,1,2,4,5,5

#SBA 1,1,"Lorem ipsum dolor ...";

...


Place StringBox (from V1.3)

#SBP

Obj-ID, x, y, Anchor, Width, Height, Radius, ScrollbarWidth(text height)

The command places a StringBox with the given Anchor at the position x, y with a defined Width and Height. Optionally, the width of the scrollbar can be specified (ScrollbarWidth). If no value is specified, the text height is used as the width. It's mandatory to assign a style to the StringBox, otherwise it's invisble (see #SBS).


Define styles for StringBox (from V1.3)

#SBS

Obj-ID, DrawStyle-No. Background, DrawStyle-No. Scrollbar, TextStyle-No., BorderX(0), BorderY(0), AutoWrap(1)

The command defines the appearance of the StringBox. Two DrawStyles are required. On the one hand the background of the EditBox and on the other hand the bar of the slider (scrollbar) is defined. The structure is described in more detail in the subsection DrawStyle. The appearance of the character string is determined with the TextStyle (TextStyle-No.). This is explained in more detail in the TextStyle subsection. With the two optional parameters (BorderX and BorderY) the distance of the text to the edge of the box can be specified. AutoWrap determines the line break:

AutoWrap

0

Text is cut off at the end of line

1

Automatic line break active


Add paragraph (ab V1.3)

#SBA

Obj-ID, Paragraph, "Text";  "Text (Line+1)"; "Text (Line+2)";....

With the command additional lines can be added to the StringBox. The parameter Paragraph specifies the position in the box. The first line has the number 1. If 0 is selected as the paragraph, the text is added at the end.

...

#SBA 1,1,"Hello World";

...


Remove paragraph (from V1.3)

#SBD

Obj-ID, Paragraph, Line1. ...

One or more paragraphs are removed from the StringBox. If 0 is passed as a paragraph, all strings are removed from the StringBox and the box is empty. Areas can also be specified, e.g. 1-5.


Add text file (from V1.3)

#SBF

Obj-ID, Paragraph, <Textfile>

A StringBox can also display complete text files. The parameter <Textfile> specifies the path to the file. The parameter Paragraph specifies the position in the box. The first line has the number 1. If 0 is selected as the paragraph, the text is added at the end.

...

#SBF 1,1,<P:Testfile.txt>

...


Jump to line (from V1.3)

#SBO

Obj-ID, Line, Time (0), ActionCurve-No (0)

The content of the StringBox jumps to the specified line. The jump can be animated with optional parameters. The Time parameter is specified in 1/100s. If the value is positive, the duration is used for the entire scroll area. The speed is therefore constant. A negative value determines the time until the new line is reached. So the speed depends on the number of lines to be scrolled. The ActionCurve-No. determines the chronological sequence. This is explained in more detail in the sub-chapter Action Curves and Action Paths.



Formatted string

Formatted strings are used in string outputs. The format is based on the C-function "printf". The function has a format specifier and the concrete arguments to be issued. The following specifiers are used in the format string for the various data types:


Type

Placeholder

Example

Fixed-point value decimal

%d

42

Octal value

%o

645

Hex value

%x, %X

7a, 7A

Float

%f,

299.57

Scientific notation

%e, %E

2.9957e+2, 2.9957E+2

Shortest Notation: Float or scientific

%g, %G

299.57

Character

%c

a


Each specifier can be additionally formatted with flags, field width and accuracy, in this order:

Flag

Description

-

Align the value left justified, Right justified is default.

+

Show '+' and '-' depending on the value

(space)

Show ' ' (space) if value is positive, '-' if value is negative.

#

Showing hex and octal values, the 0x, 0X or 0 is shown if the value is 0.

Float and scientific notation will always have a '.' output - even if only 0 follows. Default the point is only output if values follow

0

Within the field width, left-unnecessary space is filled up with 0.


Field width

Description

(number)

Minimum field width for outputting the value

*

The field width is given by the arguments. The width is directly defined in front of the value in the arguments.


Precision

Description

.number

Integer: Minimum count of digits (default =1)

Float: Minimum count of digits after the point (default =6)

.*

Number of digits is taken from the argument list. The number of digits is directly before the actual argument in the list.