Macro Editor

Home • Gallery • Tutorials • Download • Purchase • Site Map
 

Macro Editor Overview

Macros are the set of Objects, Inline Functions, Inline Methods, and #Define Statements, available to all your programs.

The Fractal Science Kit fractal generator Macro Editor is used to view/edit macro code, including the built-in macros, My Macros, and any file containing macro definitions. The built-in macros cannot be changed and are opened in the editor as [read-only]. Of course, you can copy 1 or more macros from the built-in macros to My Macros, rename them, and make any changes you wish.

The Macro Editor is also used to view/edit macro files. Macro files are created using the Export command described below. To open a macro file, use the Open File command on the Fractal Window.

When you change the code in the Macro Editor, the changes are immediate. That is, changes do not need to be explicitly saved but are automatically saved as you make them. A Save command is not required/supported. This is very convenient but you must be careful to backup your code prior to making changes in case you decide to discard your changes at a later time.

Of course, as long as the editor remains open you can undo any changes you have made using the Undo command on the Edit menu but once the editor is closed, the undo buffer is lost and you would need to rely on your backups (or your memory) to put things right. To backup some or all of your code, you can use the Export command on the File menu to export the selected text (or the entire file if no text is selected) to a file. To backup all the XML files in your My Programs folder, execute the Backup My Programs command on the Tools menu of the Fractal Window.

The built-in macros and My Macros are compiled when you start the application. When you make changes to the macros in My Macros, you must recompile them before you can execute any of your programs. The title of the Macro Editor changes to My Macros [not compiled] when you edit the file to remind you that changes have been made but the macros have not yet been successfully recompiled. My Macros must compile free of errors before you can execute any of your programs. If you try to display a fractal before compiling My Macros, the application will compile My Macros for you. Of course, if any errors are encountered, you will need to fix them before you can proceed.

Fractal Science Kit - Macro Editor

The editor pane at the bottom of the window is a simple text editor to view/edit the macro source code. See Editing Text for details.

The menu items provide complete access to all of the commands. Most of the commands have a toolbar button as well. The following description is aimed at the menu items but applies equally well to the toolbar buttons which are not described separately. Hold the mouse over the toolbar button to see the associated menu item text.

File Menu

Fractal Science Kit - Macro Editor File Menu

The File menu has the following commands:

  • Compile is used to compile My Macros prior to use. The Compile command is enabled only if you are editing My Macros and only if the macros have not been successfully compiled. After you make changes to My Macros, it is recommended that you compile the code to ensure there are no errors. If any errors are found, they are reported in the Error/Debug Window so that you can correct them. My Macros must compile free of errors before you can execute any of your programs.

  • Export... displays the Export dialog to export some or all of the text in the editor to a file. If text is selected, only the selected text is exported. Otherwise, the entire file is exported. You can use this to backup your code prior to changes or to save selected code to a file to share with your friends.

  • Page Setup... displays the Windows Page Setup dialog to gather default page settings for printing your files. These settings are shared between all the Fractal Science Kit macro/program editors.

  • Print Preview... displays the Print Preview dialog allow you to preview the document before printing.

  • Print... displays the Windows Print dialog to print your code.

  • Close closes the Macro Editor.

Edit Menu

Fractal Science Kit - Macro Editor Edit Menu

The Edit menu has the following commands:

  • Undo is used to undo the last change to the text.

  • Redo is used to redo a change you previously undid!

  • Cut deletes the selection from the editor and places the text on the Windows clipboard.

  • Copy copies the selection to the Windows clipboard.

  • Paste replaces the selection (if any) with text found on the Windows clipboard.

  • Delete deletes the selection from the editor.

  • Select All selects all the text in the editor.

  • Find and Replace... displays the Find dialog that you can use to find/replace a word or phrase in the text.

  • Increase Indent is used to increase the indentation of the selected block of text. Increase Indent is disabled if the selection is empty or does not contain 1 or more entire lines of text.

  • Decrease Indent is used to decrease the indentation of the selected block of text. Decrease Indent is disabled if the selection is empty or does not contain 1 or more entire lines of text.

  • Comment Block is used to comment the selected block of text. Comment Block is disabled if the selection is empty or does not contain 1 or more entire lines of text.

  • Uncomment Block is used to uncomment the selected block of text. Uncomment Block is disabled if the selection is empty or does not contain 1 or more entire lines of text.

Help Menu

Fractal Science Kit - Macro Editor Help Menu

The Help menu has the following commands:

  • Open Documentation... opens the documentation in your browser to this page.

 

Copyright © 2004-2019 Ross Hilbert
All rights reserved