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

(logo)

If mailto: or http:// links don't work

 


(Technical support)

If you want to open a Cardbox page or an email from within a Cardbox macro, you need to issue a command to Windows to ask it to do this.

You may know that if you open the Windows start menu, select the Run command, and enter a Web address complete with the http:// prefix, your Web browser will appear and will open the appropriate page.  If you use the mailto: prefix, your email program should open instead.

The Cardbox system menu is at the top left-hand corner of the Cardbox window.  You can open it by clicking on it or by pressing Alt+Space.

If you open the Cardbox system menu, select the Run command, and enter a complete web address, exactly the same thing should happen, because Cardbox uses exactly the same Windows function (ShellExecute) as is used by the Run command in the Windows start menu.  The instructions given in Using Macros to Link to External Objects, for opening web pages and sending emails, depend on the correct behaviour of this mechanism.

Unfortunately, Microsoft have decided that you need to be protected from so much ease of use, and in Windows XP, 16-bit programs such as Cardbox 2.0 are not allowed to use the http:// and mailto: mechanism.  This article describes how you can get round the restrictions so that you can still make Cardbox macros do what you need.

A sample solution for http://

Here are some sample commands for starting Internet Explorer, Netscape, and Opera with a specific Web page.  In each case, the command must be put on a single line, and the quotation marks should be inserted as shown.

"c:\Program Files\Internet Explorer\iexplore.exe" -nohome http://www.cardbox.com

"C:\Program Files\Netscape\Navigator\Program\netscape.exe" http://www.cardbox.com

"C:\Program Files\Opera\Opera.exe" http://www.cardbox.com

Alternatively, you can use the same Registry method for http:// as is described for mailto: in the next section.  This is more complicated to set up but should always yield correct results.

To adjust these solutions to your particular problem:

  1. Identify which Web browser you are using.
  2. Use Windows Explorer to find the browser's program name.

Now, instead of using a Cardbox macro that starts the Run command with just a Web page address, you can create a slightly different macro that starts the Run command and enters the appropriate filename for the browser before the Web page address.  This is an irritating bit of additional complexity, but once you have done it, it will remain permanently automated.

Using the Registry to solve mailto:

The commands used to start email programs are complex, unintuitive, and badly documented, so the best way of finding out the command to be used is to ask Windows what command it is using for itself.  For this purpose, you need to run the Registry Editor.

  1. Open the Start menu in Windows, select "Run...", and enter the command regedit (then hit Return or press OK).
  2. The registry editor window is divided into two panes.  On the left-hand side you should see "My Documents" followed by a list of codes starting with HKEY_CLASSES_ROOT.  If you find yourself in the middle of a list instead, scroll up to the top of the list.
  3. Double-click on HKEY_CLASSES_ROOT.  You should see a long list of codes all of which start with a dot.
  4. Scroll down.  Eventually the codes beginning with a dot will be finished, and you will come to an alphabetical list of longer names.  Find the entry for mailto and double-click on it.
  5. You will see a short list of names just under mailto: find shell and double-click on it.
  6. You will see one or two names under shell: find open and double-click on it.
  7. You will see one or two names under open: find command and double-click on it.
  8. On the right-hand side of the screen, you will see an entry called (Default).  Double-click on it, and a dialog box will open up, with a command line highlighted under "Value Data".  Press Ctrl+C to copy this to the Clipboard, then press the Cancel button, then close the Registry Editor.  Do not hit Return.  Do not press OK.
  9. Run Notepad or Wordpad and press Ctrl+V so that you can see the command that you copied.

The exact text of the command that you get out of this process will depend on how your system has been set up, but it will look something like this:

"C:\progra~1\micros~2\office10\outlook.exe" -c IPM.Note /m "%1"

Before you do anything else, make sure that this command works for you in Cardbox.  Open the Cardbox system menu, select "Run", and paste the command into the box.  If there is a %1 in the command line, replace this with an email address (for instance, cardbox@cardbox.com).  If there isn't, put an email address at the end of the command line.  Then press OK and see what happens.  If your email program opens up with an appropriately addressed blank email, everything will work; if not, then you cannot send emails from Cardbox.

Recording the macro

  1. Select the Cardbox command Macros, Start Recording, or press the Record button on the toolbar.
  2. A small toolbar will appear on top of the Cardbox window. Press the button marked "Fields".  A list of fields will appear.
  3. In the list of fields, select the THING field.  You'll see the contents of the field in the current record, as a confirmation.
  4. When you're sure that you've chosen the right field, press the button marked "Copy".  This will copy the contents of the field to the Clipboard.
  5. Open the Cardbox system menu and select the Run command.
  6. Type the whole command that you extracted from the Registry.  You must type this yourself: you cannot paste it, because Cardbox will record the act of pasting the command rather than the text of the command itself.
  7. If the command contains %1, use the arrow keys to move to it, delete it, and leave the cursor exactly where the %1 was.  If the command doesn't contain %1, put a space at the end of the command line and leave the cursor just after that space.
  8. Press Ctrl+V to paste the name into the command.
  9. Press OK.  A blank email should open, with the email address that you pasted in from the field.
  10. Switch back to Cardbox.  Press the Stop button on the toolbar, or select the Cardbox command Macros, Stop Recording.
  11. A dialog box will pop up that lets you give the macro a name.  If you need help on the use of this dialog box, press the F1 key.
 

© 2003 Cardbox Software Limited  (logo)