TutorialGetting Started with MacrosMacro EditorUser InterfaceMenus and ToolbarEditing Macro StatementsExpression EditorMacro DebuggingHow ToUsing variablesFinding and modifying objectsCreating new page contentAsking for user inputStoring persistent dataSorting objectsSample MacrosConceptsExpressionsObjectsPropertiesVariablesData TypesArraysFunctionsLiteralsOperatorsComments |
Last updated on: February 06, 2021
Also available as a single HTML file Onetastic Macro Documentation > Concepts > Comments CommentsYou can provide comments between macro statements to improve readability of your macros. Comments are inserted using Comment statements : // Create a new dialog box
$dialog_box = DialogBox_Create("")
// Now add some controls
DialogBox_AddTextBox($dialog_box, "&Find what", $Search, "", false)
DialogBox_AddTextBox($dialog_box, "&Replace with", $Replace, "", true)
$Options = Array("Current page", "Current section", "Current notebook")
DialogBox_AddDropDown($dialog_box, "&Scope", $Scope, "Current section", $Options)
DialogBox_AddCheckBox($dialog_box, "Match &case", $MatchCase, false)
// Now show the dialog box
DialogBox_Show($dialog_box)
This helps with visually separating statements. Comments can also be used to temporarily remove statements from macro execution by moving them under a comment (commenting-out): // Create a new dialog box
$dialog_box = DialogBox_Create("")
// Now add some controls
DialogBox_AddTextBox($dialog_box, "&Find what", $Search, "", false)
DialogBox_AddTextBox($dialog_box, "&Replace with", $Replace, "", true)
![]() |
ReferenceStatementsForEachIfElseWhileExpressionCommentBreakContinueReturnHierarchy ObjectsNotebookRootNotebookSectionGroupSectionPagePage ObjectsTitleOutlineTableColumnRowCellParagraphTextImageEmbeddedFileTagOther ObjectsDialogBoxFunctionsArray FunctionsColor FunctionsData Store FunctionsDate/Time FunctionsDialog Box FunctionsMacro Execution FunctionsObject FunctionsString Functions |