by Kay Dion
Macro Express provides three different ways to set macros: Scripting Editor, Direct Scripting, and Capture. This handout will focus on Direct Scripting, as I believe this is the easiest way to get started. It will also guide you through the basics to set up a simple macro; others can be found in the Question and Answer section.
Before you begin, make sure the window you want to use the macros with is open. Let’s assume it’s ALEPH, since most people will be using Macro Express for that. Now we’ll get started:
1) In Macro Express menu at the top, click on Macros Add Macro or just click on the shiny paper with the folded corner in the Toolbar.
2) Select a key or key combo to assign to the macro. You needn’t scroll down the list to find one; you can just hit the key(s) you want and they’ll appear in the assignment window. Just make sure any key you select doesn’t conflict with an already assigned macro. And don’t worry if you find you don’t like the key(s) you’ve selected.. these can easily be changed later. NOTE: Do not use F1. This is hard-coded in Aleph and cannot be reassigned to any other macro.
3) Once you’ve selected your hotkey, click on Direct Editor.
4) This will bring up a scripting window with one menu on the left, a menu on the bottom, and a big blank where your script will go. Ignore the menu on the left; you won’t need it for this. The bottom menu is the one you will be using.
5) Switch to your Aleph window and type in whatever it is you want the macro to imitate. This will help you remember the keystrokes you used. These keystrokes are your “script”.
6) Switch back to Macro Express and begin your script. For handout purposes, let’s assume you want to add a 928 AUTHORITY field. Remember your keystrokes? F6, 928, tab tab, skip over the preset ‘a’ subfield letter, type AUTHORITY. So in Macro Express we’ll do this:
Congratulations! Your script is done! Now to finish setting it up:
7) Click on the Properties tab at the top of the scripting window. Give your macro a name. You can use slashes if you want, i.e. 999/a/b/c to give you a better idea of what the macro does.
8) Click on the Scope tab then select Window Specific, then the Select button. This will assign your macro to a particular window, i.e. Aleph. Highlight Aleph in the Window Title list, click on Add, then OK. It is a good idea to do this for every macro you make, otherwise if you accidentally use that particular hotkey in a different window it will a) do a different function, b) go kerblooey, or c) sit there wondering if you just tried to give it a command in Martian. No fun!
9) You can ignore the Security and Notes tabs. Once you’ve completed all the steps above, save the macro using File, Save, Ctrl+S, or simply click on the little floppy disk icon in the Toolbar under the File word.
10) Now you can test your macro in Aleph. If you need to make any changes, refer to the Question and Answers section below.
If you have any questions or suggestions to add to this document, just let me know.
A. This is easy to fix. Just open Macro Explorer, find the name of your macro in the list, double click on that, and the scripting box will open showing the script as you originally typed it in, broken down line by line. A little experimenting will show you the proper placement of whatever you originally left out. (Thanks to Meghan for pointing out this method, since I’d been highlighting the macro in the list, opening Properties, and clicking on the Script tab. This method will show your slightly altered script as Macro Express reads it. The script still works the same either way.)
A: Yes! You can ‘stack’ several commands within one macro. Just ‘write in’ the first field script as usual. At the end of that field, click on the F6 button in the menu and ‘write in’ the second field. In this manner, add as many new fields as you’d like. Then finish setting up the macro as usual.
A: Again, yes. All you need to do at the end of the first field line is click on the F7 button in the menu, type in whatever subfield letter you want, and go from there.
A: This is very easy to do! Just go to Macro Explorer, highlight your macro, click on Properties, then click on the Activation tab. Click on Set Hotkey to reassign your new macro. Again, check first to make sure there are no other macros using that key/key combo. Then click on Ok.
A: Sure. Set up the macro as usual, then when you no longer need it just highlight the macro in the Macro Explorer list, then click on the trash can in the Toolbar to get rid of it.
A: It might be set as a Global (System-wide). Open the macro’s Properties window, click on Scope, then select Window Specific. Highlight whatever window (i.e., Aleph or Connexion) you want to use the macro with, and click Add. Then Apply and Close.
A: Yes. In the macro’s Properties window, click on Scope then Window Specific. Highlight each window you want to use the macro with, and click Add. Once the windows you want are in your Selected Windows list, just Apply then Close.
A: You can! Just set up one macro the way you want (hotkey, script), then use the Scope menu to assign it to the proper window. Then create a new macro with the same hotkey and appropriate script, then again use the Scope menu to assign it to the proper window.
A: Yes, but use the Quick Wizard instead. It will guide you through the steps and help you set up a macro. (See below for instructions.) Once your macro is set up and assigned, you can highlight the macro in the Macro Express list, open Properties, click on the Script tab, then insert whatever fields you need for, say, a 910 field cat date macro. The script for the latter should look like the following:
<TEXTTYPE:<F6>910<ARROW RIGHT><ARROW RIGHT>|><TEXTTYPE:a|><DT:mm”/“dd”/“yy|F:00:1:><TEXTTYPE: – kbd|>
The ‘kbd’, of course, being replaced by your own initials.
Or if you just double-click on the highlighted macro in the list, your script should look like this:
A <TEXTTYPE:<F6>910<ARROW RIGHT><ARROW RIGHT>|> A <TEXTTYPE:a|> A <DT:mm”/“dd”/“yy|F:00:1:> A <TEXTTYPE: – kbd|>