This information is for Version 2.0 of Cardbox for Windows.
We recommend that you upgrade to Cardbox 3.

(logo)
Macros and pushbuttons  

(Technical support)

Recording a macro is a good way to automate a repetitive operation.  All recorded macros are always available through the command Macros, Play, but if the macro is one that you use often, you may want to be able to run it more easily.

 

For more information about macros, read the Cardbox reference manual, or select "Macros" from the online Help.

 

 

 

Add it to the Macros menu

  1. Use the menu command Macros, Manager to open the Macro Manager.
  2. In the list that appears, highlight the macro that you want, and press Edit.
  3. There is a checkbox marked "Menu".  Turn it on. 
  4. Press OK to close the dialog box.
  5. Press OK again to exit from the Macro Manager.

If you want the menu item to be easily accessible from the keyboard:

Suppose that your macro is called "Add Record", and you want it to be accessible from the keyboard by typing Alt+M, R. Then you would do the following:

  1. Use the menu command Macros, Manager to open the Macro Manager.
  2. In the list that appears, highlight the macro that you want, and press Edit.
  3. There is a checkbox marked "Menu".  Turn it on.
  4. Edit the name of the macro so that it reads "Add &Record".
  5. Press OK to close the dialog box.  Cardbox will tell you that a macro called "Add Record" already exists and ask you if you want to replace it.  Say Yes.
  6. Press OK again to exit from the Macro Manager.

 

Define a keyboard shortcut

  1. Use the menu command Macros, Manager to open the Macro Manager.
  2. In the list that appears, highlight the macro that you want, and press Edit.
  3. There is a list box marked "Shortcut Key".  Open it up and pick the keyboard shortcut that you want to use for this macro.  Shortcuts that you have already used are highlighted in red.
  4. Press OK to close the dialog box.
  5. Press OK again to exit from the Macro Manager.

You don't have to put the macro into a menu in order to give it this kind of keyboard shortcut; but equally, you can give it both a keyboard shortcut and a menu entry if you like.

I know what keystroke I want, but I can't see it in the list.

Cardbox has a number of built-in shortcuts (such as Ctrl+Shift+E to edit a format), and you can't override these

I have assigned a keystroke but it doesn't work.

Windows 95 and above intercepts certain key combinations (such as Ctrl+Shift+W) and hides them from all application programs. There is no logical reason for this, since Windows simply discards those keys without doing anything with them, and because it is completely undocumented, there is nothing we can do about it.  If a Ctrl+Shift key combination doesn't work, try a different one.

Create a pushbutton

 

1. Design the appearance of the pushbutton in a graphics program, and copy it to the Clipboard.

For more information, see Capturing graphics for use in Cardbox formats.
2. Use the Format, Edit, Format command to edit the format in which you want to place the pushbutton.  

3. Use the command Insert, Pushbutton to insert the pushbutton into the format.  Use the normal format editing tools to make it the size you want.

4. As soon as you have drawn the space for the button (which you can change later), the Pushbutton Properties dialog box appears.  It includes a list of macros for you to choose from. and lets you choose whether the macro should be available when you are editing a record, or not editing a record, or both.  For full details, press F1 while you are in the dialog box, and a help page will appear.

If this menu option is disabled and appears grey on the screen, look at the bottom of the window for an explanation.  The most usual cause is that you haven't copied the graphic to the Clipboard.  You don't need to exit.  Just switch to your graphics program, copy the image to the Clipboard, and then switch back to Cardbox and try again.

© 1999 Cardbox Software Limited  (logo)