Functions and Variables
Functions
ShowMsg("");
Shows a message dialog with the give text
Execute("");
Executes the given value (if none is given the selected text will be executed)
SetVarValue("");
Sets the %VAR% value
DecVar("");
Decrements %VAR% by give value
IncVar("");
Increments %VAR% by give value
MoveSelPosBy("");
Moves the cursor (the value can be negative)
SetSelLength("");
Sets the length of the selection
SetSelPos("");
Sets the position of the cursor
ResetSelStart;
Resets the %SELSTART% value
SelectAll;
Selects all text
InsertText("");
Inserts text
LineBreak;
Inserts a line break, same as %BR%
LaunchFind;
Opens the Find dialog
LaunchReplace;
Opens the Replace dialog
InsertFile;
Executes the Insert file function
Save;
Saves the current document
SaveAll;
Saves all opened files
Undo;
Executes the Undo function
Cut;
Cuts the selected text to the clipboard
Copy;
Copies the selected text to the clipboard
Paste;
Pastes text from the clipboard
Crop;
Crops the selected text
Delete;
Deletes the selected text
Highlight;
Highlights the selected text
RemoveHighlight;
Removes highlighting
WordWrap;
Enables and disables Word Wrapping
InputVar;
Enables inputing a value to %VAR%
Goto("");
Jumps to a certain line in the script specified by the given value. The first line is number 0. Goto only works together with a If or IfNot function.
OpenFile("");
Opens file specified by the given value
Exit;
Aborts the execution of the script
Quit;
Exits mdiNotepad
Variables
%VAR%
Variable that can be set anytime (using SetVarValue) and be given any value
%SELPOS%
The cursor position
%SELLENGHT%
The length of the selection
%SELSTART%
The position of the cursor when the function key was pressed, can be later changed using ResetSelStart;
%LINESTART%
The number of the character in the beginning of the current line
%LINEEND%
The number of the last character on the current line
%ROW%
Current row number
%TIME%
Current time
%DATE%
Current date
%FILE%
Current file
%TEXTLENGTH%
Length of the whole document (character count)
%BR%
Line break