Direct Editor


In the Script Editor, macro commands are displayed in an easily recognized and understood format. To achieve this simplicity, some of the details about each command are only displayed in the edit dialog for the macro command. In the Direct Editor, all details about each macro command are visible. When describing these two ways of viewing macros, we refer to them as the Script and ASCII representations.


To view the ASCII representation of a macro click View > Direct Editor from the Script Editor menu. Note that when in the Direct Editor view, all open macros are displayed in their ASCII form. You can use either the Script Editor or the Direct Editor to build or edit a macro.


The Direct Editor is divided into three main components, the Commands, the Macro Text and Edit Buttons/Debugging tabs. Select from the commands what to insert into the Macro Text. The Macro Text reads from left to right so that the top line in the text, starting at the left, is the first command that plays back in the macro.


The Script tab contains the list of commands and the macro script. Additional information about the macro can be viewed or edited in the Activations, Variables, Miscellaneous, Scope, Security and Notes tabs.


Note: More than one macro may be open in the editor at the same time. Tabs at the bottom of the window allow for navigation between open macro scripts.




Script Editor > View > Direct Editor



Macro Icon and Nickname

The Macro Nickname field and a macro icon are displayed near the top of the Direct Editor window. In the example below the icon is a blue number one.





Macro Icon

The icon (in the example above, a compass) is displayed to the left of the macro nickname. Click on the icon to open the Select an Icon window. Click on the browse button to open a folder with a number of icon options. Or navigate to another location on the hard drive to find other icons on the computer. If an icon was not selected at the time the macro was created, the default Macro Express icon is displayed.


Macro Nickname

The nickname is used to help remember the function of the macro. If a nickname was assigned when creating the macro, the nickname is displayed as shown in the image above. The nickname may be changed in this field if desired.





Command View

Select from the drop down menu which command view to display.


All Commands

This option displays all of the commands that may be used in Macro Express. To insert a command into the script, scroll until finding the command category wanted. Click on the category to expand the list and display all of the commands available for that category.


Double click on the command to display a window to define what the command should do. Then click OK on the new window to insert this command into the Macro Script.


Double clicking on some of the commands that do not require any definition inserts the command directly into the Macro Script without an intermediary window.


Favorite Commands

This option displays only the commands that are assigned as favorites, making it easier to find the most frequently used commands. From the Script Editor menu click on Options > Customize Favorites to assign the favorites.


Code Snippets

Code snippets are pieces of macro script that may be reusable in other macros. Rather than rewriting the section of macro each time, save the lines of the macro as a code snippet and retrieve at any time as needed.


Note: Code Snippets may only be created and saved in the Script Editor view.


Inserting a Snippet into the Script

Highlight the Code Snippet to use and drag it onto the Direct Editor script.



Search For Command

Use this function to help locate a specific command within the Commands list. To look for the Password Protection command, enter "pass" without the quotes. This highlights the Password Protection command within the list of commands. Notice that entering the "p" and the "a" first displays the Pause command. Adding the "ss" moves the highlight to the Password Protection command.





Macro Text

This area lists each of the commands that the macro performs. The macro plays back sequentially from top to bottom. Each command in the macro is typically displayed on a separate line. But it is possible to insert more than one command on a line. To insert a command into the text, place the mouse cursor where the command should be positioned. Then select the command and it is inserted to the right of the mouse cursor in the Macro Text field.


Note: It is not necessary to use the Text Type command in the Direct Editor. Just type the text to be played back directly into the edit field. Macro Express converts the text to a Text Type command when the macro is saved and the Editor is reopened.



Debugging Tabs

These tabs provide information when trying to debug a macro. Also click on Debug > View Variable Values or press the F5 key to see a display of all variables used in the macro and the values saved to those variables. These are displayed when running the macro in Test Mode.



When saving a macro, any syntax errors or other problems with the macro are displayed in the Messages tab.



This tab displays any breakpoints defined in the macro for debugging purposes. The line number of the Break and the command are displayed.




Keys Tab

Use the Keys tab to insert symbols or other keystrokes directly into the script.


Special Keys and the F1 - F12 Keys

Click on any of the entries (keys) in the yellow box area. For example, clicking on the Alt key places the Alt command into the Macro Text field. The Alt key plays back in the macro at that point in the script. Or Tab to the entry and press Enter. Click on the F1 - F12 keys to input these keystrokes in the Macro Text field and have them play back in the macro.



To insert a symbol into the Macro Text click on the Symbols button to display a window with a number of symbols. Double click on the symbol wanted and it is inserted into the Macro Text. Or highlight the symbol and click on the OK button. Also use this function to insert Alt Key Sequences. See the Text Type topic for more information.


Misc Keys

Miscellaneous keystrokes such as the Print Screen, Right Window Key, etc. may be inserted into the script. Click on the "Misc Keys" button to open the dialog as shown below. Select the key to insert and click on the OK button. The Miscellaneous Key is placed into the Macro Text at the location where the text cursor is positioned.






Click on the Variables button to open the Insert Variables window and choose a variable to play back in a macro. Select the variable from the variable types available and click on the OK button. This places the variable into the Macro Text at the location where the cursor is positioned. Or click on the Add button to name a new variable to use in the macro.




Direct Editor > Variables Button