Selected Macro

Navigation:  ScriptLine Properties > Macros Options >

Selected Macro

Previous pageReturn to chapter overviewNext page

The first tab of the Macros Property Editor, is used to associate a macro with each macro token index referred to in the current GridTemplate.


When you click on an item in the list of Macro tokens, if a macro is already associated with that token, it will then be selected in the list of macros, to the right the list of macro tokens in the current grid. To associate a macro, select the location of the new macro in the list of Macros Sets, and then select the new macro. Then click on APPLY to associate that macro with the token selected in the tokens list.



At the top right of the Macros Options editor window, there are the 4 macros access buttons.


Click on this button to open the currently selected macro in the Macros Editor. There you will be able to make modifications to that macro, and upon closing the Macros Editor, any change you have made will immediately be reflected in the Macros Options Editor (in particular, any modification to INCLUDE_MACRO directive).

Use this button to replace the macro code of the currently selected macro by the macro code contained in a standalone QPX file (usually sent to you by technical support). Note that this does not change which macro is selected, it changes the textual contents of the selected macro (ie. the macro will retain the same name, and this will affect all scripts that use this macro). Before an irreversible change is made, you will be given the opportunity to see a side-by-side comparison of the macro code of the currently selected macro and of the text in the QPX file.

Use this button to import the macro code contained in a standalone QPX file (usually sent to you by technical support) into a new macro of the shared database of macros. This does not affect the currently selected macro. Once a macro has been imported, if you wish to use it, you must select it.

Use this button to export the macro code of the currently selected macro into a standalone QPX file (to send to a user at another site, for example). This function is mainly used by technical support to send macro to users.


The list of Macro tokens is automatically filled by Q++Studio :


All the Macro tokens contained in the GridTemplate of the current DiaryGridLine are listed according to their macro index. If you do not find a token you were expecting, it means that the syntax of your macro token is incorrect.


Depending on the settings used in Initial Conditions, you may also see some included macros, denoted by #INCLUDE. These are Macros which are not referred to in the GridTemplate, but which are called recursively by another Macro.


In the example above, you will note how there are more than one token sharing the same macro index for indices 4 and 9. You may sometime need to apply the same Macro to many different tokens (for example : shade text in red if holiday for [d], [dddd], [mmmm], ... ). This is a trick that allows you to define only one macro (and initial conditions and resulting actions) for all these tokens at once.

Topic 135600 updated on 03-May-2018.
Topic URL: