TurboWarp extension guide

Turn text into lines.

Count lines, read one line, or copy every line into a Scratch list with three focused blocks.

Quick start

Load the extension

Text Lines writes directly to Scratch lists, so it must run without the extension sandbox.

Add to TurboWarp

In TurboWarp Desktop, open Extensions, choose Custom Extension, then load the downloaded file.

Allow list access

Enable Run extension without sandbox when TurboWarp asks for permission.

How it works

One input, three useful results

Text Lines separates the input wherever it finds a line ending, then uses the resulting lines in the block you choose.

Input text
Apple
Banana
Cherry
number of lines in text
Reports3
line 2 of text
ReportsBanana
put lines of text into list items
List “items” becomes
  1. Apple
  2. Banana
  3. Cherry
The list block replaces the list’s existing items. The two rounded reporter blocks only return a value.

Block reference

Choose the result you need

number of lines in text

Count lines

Returns how many lines the input contains.

  • A blank input is one empty line.
  • A final line ending adds an empty last line.
line 1 of text

Read one line

Returns the line at the requested position.

  • Line numbering starts at 1.
  • Invalid line numbers return an empty string.
put lines of text into list list

Fill a list

Splits the input and writes each line as one list item.

  • Choose a stage or sprite list from the menu.
  • Existing list items are replaced.

Details

Line endings and list safety

Works across platforms

LF (\n), CRLF (\r\n), and CR (\r) are all treated as a single line ending.

List changes are immediate

The selected list is updated as soon as the command block runs, and list monitors refresh automatically.

Before running: copy any list contents you need to keep. The block replaces them.

Text Lines: complete block reference

All 3 blocks are documented below, including compatibility blocks and blocks available through optional features. Select a block to read its behavior, arguments, default values, and menu choices. Each block has a permanent link.

number of lines in [TEXT]

Returns the number of lines in the supplied text.

Block type: REPORTER. Opcode: lineCount. Permanent link

ArgumentTypeDefault valueMenu choices
TEXTSTRINGfirst line second line

line [LINE] of [TEXT]

Returns one line using a one-based line number. Invalid line numbers return an empty string.

Block type: REPORTER. Opcode: lineAt. Permanent link

ArgumentTypeDefault valueMenu choices
TEXTSTRINGfirst line second line
LINENUMBER1

このブロックの固定入力編集と互換性

put lines of [TEXT] into list [LIST]

Replaces the contents of the named Scratch list with the lines of the supplied text.

Block type: COMMAND. Opcode: writeLinesToList. Permanent link

ArgumentTypeDefault valueMenu choices
TEXTSTRINGfirst line second line
LISTSTRINGNot specified

Repository guide and examples

固定入力の編集

対応GUIの固定入力機能は既定OFFです。既存値は開いただけでは変更せず、reporter接続は評価・置換しません。新しい選択と有限JSON数値入力のみを検証して保存し、既存の補正・丸め処理を維持します。機能OFFで従来の編集へ戻せます。

対象入力・Schemaの正本・互換性・切戻し