PRIMER 22.1

Assigning Macros to Buttons

Assigning Macros to Buttons

When PRIMER starts it automatically looks for macros in the directories:

  • $OA_ADMIN/primer_library/macros (if $OA_ADMIN is defined)
  • $OA_INSTALL/primer_library/macros
  • $OA_HOME/primer_library/macros

Each macro that is found is assigned to a button in the macros panel. The text that is shown on the button is read from the MacroName() command at the top of the macro. This is automatically added by PRIMER when you record a macro if you enter some text in the Name textbox. Additionally hover text for the button is read from the MacroDescription() command at the top of the macro. This is automatically added by PRIMER when you record a macro if you enter some text in the Description textbox.

The directory that PRIMER looks in for macro files can be changed in the oa_pref files in $OA_ADMIN, $OA_INSTALL and $OA_HOME by using the macro_directory preference.

For example if you change the macro_directory preference in the oa_pref file in the $OA_INSTALL directory to /test/primer_macros then PRIMER will look for macro files in the directories:

  • $OA_ADMIN/primer_library/macros (if $OA_ADMIN is defined)
  • /test/primer_macros
  • $OA_HOME/primer_library/macros