You may perform many BridgeComposer functions from scripts written in languages such as
(In Microsoft terminology, BridgeComposer can operate as a Windows Automation server.)
For complete details, see BridgeComposer "Help→Help
Topics", topics "Script menu" and "Automation".
BridgeComposer also supports classic ".bat-file" scripting. See BridgeComposer
"Help→Help Topics", topic "Command Line Interface".
and are intended for you to customize for your own particular needs.
(After downloading, you may modify them using Notepad or similar.) They require BridgeComposer version 5.61 or later.
Click here to download all the
scripts in a single .zip file (recommended).
Important: When viewing a script file in your web browser,
use "reload" (F5) to be sure you have the latest version.
The first three scripts are "includable", meaning that they are intended to be
combined with a larger script. They may be combined using copy/paste, or
(better) using Windows Script Host markup (see the .wsf files below).
- This "includable" script defines symbolic names for some constants used for
BridgeComposer object method call parameters.
- This "includable" script implements a Deal object which breaks down a
PBN [Deal] tag into an array of four Hand objects (for North,
East, South, and West). Each Hand object contains an array of four Suit
objects (for spades, hearts, diamonds, and clubs). Each Suit object contains an
array of card ranks.
The properties provided include Suit.hcp, Suit.length,
The functions provided include Hand.longest(), Hand.hasCard(card),
- This "includable" script implements a getRandomBoard() function that
returns a Board object with a random [Deal] tag.
For efficiency, this
generates boards in batches. Optionally, double dummy analysis may be
calculated for the generated boards.
- This script creates random deals of a selected "type".
First, the script prompts for the deal type. Four example types have been
Then, the script prompts for the number of deals to create.
- Strong 1NT opener, game-going or better response
Strong 1NT opener, invitational or better Stayman response
Major suit opener, splinter response
South dealer with 12 or more HCP, some N-S slam makeable
customize the script to implement additional deal types to generate.
This script may be called either from the BridgeComposer "Script" menu
(to add deals to an existing document), or by double-clicking (to create
a new document).
- This script scans a folder for PBN files, and then scans each PBN file
for boards in which a player has a particular card holding.
provided, the script prompts for a folder, and then lists all PBN boards
where South holds seven or more spades to the AKQ.
- This script is based on Example 2 in the BridgeComposer Help topic
It generates a series of 36-board deal sets (Morning,
Afternoon, and Evening) for each day in a specified date range. Each set
consists of a PBN and a PDF file.
The script demonstrates a technique
for prompting for dates.
Customization ideas are discussed in the Help
- This script is based on Example 4 in the BridgeComposer Help topic
It scans a PBN file and lists the boards on which a
grand slam is makeable.
This script extends the Help topic example by
prompting for the PBN file to scan and copying the grand-slam boards to a
new PBN file.
- This script updates the titles in a hand record file (perhaps received from a
third party such as ACBL or the Common Game). Customize the layout file
loaded by the script to
change settings, such as changing the "Site" to your own bridge club's name. This script may be
called from the BridgeComposer "Script" menu to update the currently
- In BridgeComposer, you may renumber all the boards in a document
starting with 1 (using Tools→All Boards, Tools→Renumber All followed
[optionally] with Edit→Select All and Board→Auto Dealer/Vul).
This script does the same, but allows you to choose any
arbitrary new first board number.
- This is an experimental script to re-score pair games using alternative
- This script clears the [Room] tag in all boards in a PBN file. The
[Room] tag cannot be set using BridgeComposer, but it may be set in
documents created by other programs. For example, it is typically set to
"Open" or "Closed" when BridgeComposer imports BBO LIN files.
BridgeComposer displays the [Room] tag in its toolbar drop-down board
- This script is based on Example 3 in the BridgeComposer Help topic
It generates 100 boards with fixed North/South hands and random
East/West hands. Then the double dummy analyses are computed and the file is
This script extends the Help topic example by prompting for
the North/South hands and the output filename.
- Sometimes, the player names in the Score Tables created via Tools→Import
Score Data are incorrect or otherwise undesirable for some reason. You
should probably submit a bug report, but you may use this script to hide the
names until a fix is available. (The Score Tables will still show the player