MACROS AND SHORTCUTS

MARC Report allows you to map function keys in two different ways:

1) As Edit Macros 2) As Appication shortcuts

There are thirty-six function keys (F-keys) that can be mapped:

Shift+F1 .. Shift+F12
Ctrl+F1  .. Ctrl+F12
Shift+Ctrl+F1 .. Shift+Ctrl+F12

You may allocate these function keys however you please: map all 36 as Edit macros, map all 36 as Application shortcuts, or map some as macros and some as shortcuts, etc. However, each function key may only be mapped once.

Edit Macros are used in an Edit Session to add pre-defined tags to a record, or to add constant data at the cursor position. Edit macros apply only to an Edit session.

Application shortcuts may be defined for both the main window (to launch MARC Global, for example), or for the actions used in an Edit Session.

Note that the unmodified function keys (eg. F1, F2, etc.) are currently reserved for use by the program menus.

EDIT MACROS

In MARC Report, edit macros are supported both in the default Marc view, and in Text view.

There are two types of Edit macros:

1. macros that add a new tag (and data) to a record, and 
2. macros that insert data at the cursor position. 

To setup or edit an Edit macro, go to the program options and select the page named 'Macros and shortcuts'. Follow these steps:

1. Click the function key that you want to map or use for your macro. A caption like 'Editing Shift+F1' will confirm your selection. 
2. Select the 'Macros' tab in the form below (if necessary--see note that follows).
3. Define the Edit macro
   a) To define a macro that adds a new tag to a record, enter the tag, indicators and data that you want to be added. The indicators will be blank by default, so there's no need to enter anything in these boxes unless you want non-blank indicators. The data cannot be blank however. 
   b) To define a macro that adds data at the cursor position, set the tag to 000, set each indicator to #, then enter the field data that you want to add. 
4. Press Save.

From here, whenever you press this function key while editing a record, the corresponding macro data will be added.

NOTES

In step #1 above, if the selected function key has previously been mapped to an application shortcut, the form below the list of keys will flip from the 'Macros' tab to the 'Shortcuts' tab, and display the name of the shortcut being mapped. If you want to keep this mapping, then select a different function key for your Edit macro. If you want to overwrite this mapping, press Delete, then re-select the function key and press the Macros tab.

NB. If you go ahead and define an Edit macro without first deleting the application shortcut, the new definition will be ignored.

Use '$' in the data field to represent a MARC subfield delimiter.

To enter an actual dollar sign, enclose it in square brackets; for example: $c[$]19.95

Changes to your Edit macros are available in the program as soon as you exit the options (unlike changes to application shortcuts, which require the program to be re-started.)

USING MACROS WHEN EDITING

To add a new tag, click on the tag immediately below where you want to insert the new tag and press the corresponding function key. For example, if you have defined Shift+F3 as an Edit macro for an 092 field, and the record you are working on looks like this–

040     $aDLC$cDLC$dDLC$dNjBwBT
050 0 0 $aPS3606.L58$bE94 2006
082 0 0 $a813/.6$222
100 1   $aFlock, Elizabeth.

–click on the 100 tag, then press Shift+F3.

To add a new tag to the end of the record, follow these steps: 1) Click on the last tag in the record 2) Press the <Down Arrow> key once 3) Press <Enter> 4) Press the function key that you have defined for your macro.

IMPORTANT: Data added to a record via Edit macros are not automatically saved; press the Save button to save any changes that result from their use.

NOTE: If you have the option to 'Sort Tags' enabled (under the Record Display options), then regardless of where a new tag is inserted by a macro (or by any other means), that tag will appear in numerical order as soon as the Save button is pressed.

FIXED FIELDS

Edit Macros may not be used in the leader; however, you can set up a macro to add a fixed field (like 006 or 007). The following notes apply primarily to Text view, which lacks some of the validation capabilities of the default view.

  • Use a macro that includes both the tag and the data
  • Do not define indicators in a fixed field macro
  • Carefully count out the number of characters for the Data portion of the macro. For the 006, the length of the macro data (excluding the Tag) must be 18 characters; for an 008, it must be 40 characters; for an 007, the length varies according to the value of the first byte–look it up if you do not know.
  • Put the cursor in the left margin below the line where you want to insert the new tag; eg., if you are adding an 007, put the cursor to the left of the first zero in the '008' before you press the function key.

APPLICATION SHORTCUTS

This feature allows you to map any of the 36 function keys listed above to actions that are normally initiated by using the program menus.

Application shortcuts may be used in place of any action normally executed either via the mouse, or the Alt key, that uses the program's menu system. In addition, application shortcuts allow you to map many non-menuitem actions to F-Keys (for example, show or hide the fixed field form, create a titlelist, export a record to XML, etc).

To setup or edit an Application shortcut, go to the program options and select the page named 'Macros and shortcuts'. Follow these steps:

1. Click the function key that you want to map or use for your shortcut. A caption like 'Editing Shift+F1' will confirm your selection. 
2. Select the 'Shortcuts' tab in the form below (if necessary--see note that follows).
3. Define the Shortcut. The list of actions has been split into two parts--those that pertain to the main form, and those that pertain to an Edit Session. Select the action that you want for this shortcut from the appropriate list by clicking on the down arrow button on the right.
4. Press Save.

From here, whenever you press this function key, the corresponding application action will be executed.

In step #1 above, if the selected function key has previously been mapped to an Edit macro, the form below the list of keys will flip to the 'Macros' tab, and display the edit macro details. If you want to keep this macro, then select a different function key for your shortcut. If you want to overwrite this definition, press Delete, then re-select the function key and press the Shortcuts tab.

NB. If you go ahead and define an application shortcut without first deleting the edit macro, the new definition will be ignored.

NOTES

Many of the menu items in the Edit Session also have pre-defined shortcuts. For example, Ctrl-Alt-M opens the MARC Review filter, and Ctrl-Alt-R clears that filter. These pre-defined shortcuts are not removed if you map a menuitem to one of the 36 function keys.

Changes to Application shortcuts for the main menu may not take effect until you restart MARC Report (ie. restart the program, NOT your computer).

Shift+F10 is potentially a conflict with Windows, which defines this key as an alternate way to pop-up the Property editor (right-click menu). Therefore, if you define a macro for Shift-F10, the program will execute your macro when you press Shift+F10, and discard the request to open the windows property editor.

To map a function key to an Application shortcut that opens the program options, use the main menu list; these items will work on both the main menu and in an Edit Session.

IMPORT AND EXPORT

When you press the 'Export macros' button (under the 'Tools' menu), all of the macros and shortcuts defined in the current profile are written to a plain text file. This file will be named 'macros-profileName.txt' (where 'profileName' is the current profile's filename) and saved in your 'Documents\MarcReport' folder. The export file is then opened using Notepad (or its equivalent).

This file is printable, easily readable by humans, and shareable with other users.

When you press the 'Import macros' button, the program prompts you to select a file–this file should be one that was created using the 'Export macros' function described above. The program will then attempt to read the selected file, and on success, any macros and shortcuts defined in that file will be written to the currently active profile. When the operation completes, the imported macros and shortcuts will be accessible on the options form, and in the program itself (once you exit the options).

NOTES

Macros and shortcuts are profile-based, so, if you have multiple profiles, only items pertaining to the currently active profile are imported/exported. Of course, you may repeat the Import or Export procedure for each profile, and even use these options to move macros and shortcuts from one profile to another.

To share macros and shortcuts using import and export, all users should be using at least version 243 of MARC Report.

There is no way presently to select only certain macros or shortcuts during export and import. However, when importing, the program will prompt you before overwriting each existing item. At this prompt you may accept or decline the overwrite action (or Cancel the import completely). So it is possible to use this prompting mechanism to selectively import macros and shortcuts (although it might be somewhat tedious if many are defined).

Do not delete any of the rows in the exported macro file; the program will consider the whole file invalid if any key definitions are missing, even if they are empty.

phelp/helpmacros.txt · Last modified: 2021/12/29 16:21 (external edit)
Back to top
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki