Set Text

Sending string


Sends string data to the memory management area of “ASTER”. There are two ways to send data: at application startup and after application startup.

ASTER::Properties::TEXT
ASTER::Action::Set TEXT

property

When accessing the extension properties of “ASTER” placed in the frame editor, there is an entry named “TEXT” in [Properties::Settings], and the initial value can be entered here.

Properties :: Settings :: TEXT Edit Box

The string set here is sent to ASTER when the application is started.。

To send strings to ASTER while the application is running, use the Set TEXT action.


Action

Set TEXT is a function that sends character strings to “ASTER” during application execution. The transmitted string data is stored in the memory area managed by the extension.

Action Menu :: Set Text

ASTER::ACTION::Set TEXT

The saved string data is used as the source string for REGEX::Replace replacements and has a wide range of other applications.

Please also read the following usage notes.

Implicit Escaping

CF25 implicitly escapes certain strings when passing string data to extensions via the expression editor. This is based on security specifications designed to prevent the application from sending control characters.

String data typically contains Control Characters; for example, in Windows OS, a newline is represented as \r\n (CRLF). However, CF25 converts newlines and therefore does not send them as control characters.

Using NewLine$

Since line breaks are control characters, they are sent as regular strings through escaping.

If you want to send line breaks from CF25 to an extension as control characters, use CF25’s proprietary NewLine$.

By using NewLine$, it is transmitted as a control character to the extension, enabling the reception of line breaks.

Details

When control character \r\n is sent from CF25 to ASTER, it is escaped to \\r\\n, and ASTER receives it as the string \r\n. It is easier to understand when expressed in Hexadecimal, so it is summarized below.

String Type Hex
\r\n Line break code 0x0D 0x0A
\\r\\n Escaped string :: \\ is \ (backslash, 0x5C) 0x5C 0x72 0x5C 0x6E
\r\n String :: \ is backslash ( 0x5C ) 0x5C 0x72 0x5C 0x6E

CF25’s NewLine$ corresponds to Windows’ line break code 0x0D 0x0A.

Other Specifications

When using Regex.Replace with regular expressions, there was an issue in ASTER Beta where control characters could not be replaced because they were converted to strings in CF25.

Due to CF25’s proprietary specifications, there are no provisions for control characters such as horizontal tabs, so it is not possible to send all control characters to extensions via the expression editor.

Additionally, directory paths like "c:\test" are sent to ASTER as "c:\\test". CF25’s implicit escaping is a beneficial feature in the context of JSON string specifications (JSON requires escaping as \ cannot be included directly in a string).

When including control characters, there may be cases where the data sent from the expression editor does not match the received data. Therefore, it is necessary to perform data processing that takes into account the differences when implicit escaping is applied.