Command Reference

Mid String

Creates a new string by copying a specific number of characters starting from a specific position in an existing string.

Action ID: 33
Action Category: Strings

Settings

Store result in variable

The variable that the result will be stored in. The result will be a new string made up of characters copied from the source string.

Source string

The string to copy the characters from.

Start at position

The zero-based character position to start copying characters from.

Number of characters

The number of characters to copy.

Return Values

None

Example

In this example, we will store the folder name of our main application directory in the custom variable %MainFolderName%.

%FolderStart% is the starting position of the folder name, which we will have determined earlier using other actions.

%FolderNameLength% is the length of the folders name, which we will have determined earlier using other actions.

Store result in variable: %MainFolderName%
Source String: %AppDir%
Start at position: %FolderStart%
Number of characters: %FolderNameLength%

 

See Also: Alphabetical List of Actions, Categorical List of Actions, On Error tab