IDE Scripting String Commands
From Xojo Documentation
These are general String-related commands that are useful when used with the other IDE Scripting commands.
Clipboard As String
Used to get or set the text contents of the OS clipboard.
Create a new Note for the selected project item and pastes in the contents of the Clipboard into the Note:
Text = Clipboard
EndOfLine As String (read-only)
Returns the default line ending for the OS running the IDE. This is also the line separator used for code editor text that is returned by Text and SelText.
Add text to a new note:
Text = "Line1" + EndOfLine + "Line2"
SelLength As Integer
Gets or sets the length of characters in the current selection of the code editor.
SelStart As Integer
Gets or sets the offset of the selection (or insertion) point in the code editor.
SelText As String
Gets or sets the selected text in the code editor. After assign a string to SelText, the selection will be empty and positioned immediately after the inserted text.
Take the selected text and add an inline constant containing the text to the top of the method and replaces the selected text with the name of the constant: