Expander v2.0

Training Software Services Ph: 61 9 430 8849

Fax: 61 9 335 5706

Internet: tss@iinet.com.au

Web: http://www.iinet.com.au/~tss

Groupwise Address: tss.tss_po.gwatson

About Expander

Expander Overview

Installing Expander

Expander Install

WordPerfect's Binary Information Files

Installation Macro

Expander De-install

Using Expander

View

Expand

Punctuation Characters

Load Phrases

Source File Creation

Source File Syntax Checking

Add

Expanding a Code

Rename

Replace

Delete

Expand All

Delete All

Database Show/Edit

Case Options

Setting Up Expander

Setup

Setting up Expander Hotkey

Password

Expand Options

Macros and Expander

Macro Commands


Expander Overview

Expander is designed to provide fast storage and retrieval of coded abbreviations.  For example, the code "tss" can be expanded to "Training Software Services", where not only the text but also the formatting (bold and italic) is expanded.  Text can be a single word, or as much as several pages.  Hard returns, hard page breaks, tabs, indents, centering, etc can also be included, as can page size codes, tab sets, and any other WordPerfect codes.

Expansion can be triggered in two ways: "Hotkey" or "Auto Expand".  For "Hotkey", a keystroke (eg F10) is assigned to the Expand function (in File|Preferences|Keyboard), and from then on, whenever you press F10, Expander tries to expand the "code" to the left of the insertion point.  If it can't recognise the code, Expander will either ignore it, or report "Not Found" depending on your Setup configuration.  For "Auto Expand", whenever you press a "white space" or "punctuation character", Expand will be triggered just as if you had pressed the hotkey.

Expander uses indexed databases which are independent of, and external to, WordPerfect.  These databases are accessible through the Expander screen available on the Tools menu once Expander has been installed.  The Expander screen enables the adding, deleting, viewing of codes, as well as the Setup screen where numerous options can be set.


punctuation_characters
Punctuation Characters

Punctuation characters include: space ~ ` ! () _ - + = | \ {} [] : ; " ' <> , ? / .


Expander Install

Expander is triggered by an entry in each individual’s private or public BIF.  Add an Item under WordPerfect|Third Party called DLL1 (or DLL2, DLL3, whatever is next) - of type ANSI String - "{path}\expand.dll" where {path} is the drive|directory location of the Expand.dll.  Alternatively, run the installation macro.

When you next run WordPerfect, the Expander startup panel will appear, followed by the Expander Setup screen.

Set the database specifications including database Alias. These can be any accessible locations and names (but avoid *.ind: this is the name of the associated Index file).  Future versions of Expander will be "network aware": they will sense the absence of nominated paths, and change to accessible ones.

The purpose of multiple databases is to enable both shared and personal databases.

*	Set the Default database by selecting the appropriate one in the Default database window.

*	Set Prompt on Not Found if you wish to be notified when a code is not found in the database(s).

*	Set Auto Expand if you wish Expander to automatically expand codes (rather than Hotkey).

*	Set Ignore First Character if you use codes within brackets or braces: this will cause Expander to not

include these characters in your code.  For example if "ex" expands to "Expander", you will probably

want "(ex" to expand to "(Expander".

*	Set Single Letter Codes to either Initial Capital or ALL UPPER.  This option occurs because Expander

is case sensitive: eg ex gives expander; Ex gives Expander; EX gives EXPANDER.  A single letter code

is thus ambiguous: E might mean Expander or EXPANDER.

*	Expand to Variable should be set off.  This option is here because the Expander macro commands

include the option to expand to variable rather than to the document.  If this is set on, there has been a

macro fault, and codes will not be expanded to the document.

*	Click Setup Hotkey to be fast-tracked to WordPerfect’s Keyboard Preferences screen.  Define a new

keyboard (you can’t edit the default ones) to allocate a hotkey to Expand (eg F10).

*	Set Prompt to Overwrite Duplicate Codes if you wish to be warned that you are

overwriting an existing code when you create a new one.

*	Choose which Expand option you wish to use.  This will set the default selection.

*	Click Ok to save your changes.  Expander writes these options to your Private BIF in

WordPerfect|Expander.

You are now ready to start using Expander!


Expander De-Install

To de-install Expander, remove the WordPerfect|Third Party|DLL1 (or DLL2, DLL3, see above) Item, and the Expander Section in the relevant BIF(s).  Delete any databases (eg private.dat) and their associated Index files (eg private.ind).  All Index files have the extension .ind.

Refer to Installation Macro.


WordPerfect’s Binary Information Files

WordPerfect for Windows uses BIFs (Binary Information Files) to store startup and configuration information.  These replace the .ini files of previous versions.  Use the BIF Editor (..wpc20\bifed20.exe) to edit these files.  To find out what BIFs a WordPerfect operator is using, access Help|About WordPerfect... in WordPerfect.

Each BIF consists of Groups, Sections, and Items.  For example, you will find a WordPerfect group, a History List section, and Items Doc1 .. Doc9 which stores the names of the last 9 documents you opened.  Notice that each Item consists of a type (Boolean, ANSI String, etc), and a value (True/False, “h:\shared\gpw\notice.wpd”).

For more information on BIF’s run Bifed20.exe, and access Help.


view
Expander:  View

Select View to see a properly formatted view of your phrases.  For example, in the edit window any Table in your phrase will show without table lines; use the window to see the table with all its lines.


Expand
Expander:  Expand

Select Expand to expand the currently selected code to the current document.

Expansion can also be triggered in two other ways: "Hotkey" or "AutoExpand".  For "Hotkey", a keystroke (eg F10) is assigned the Expand function (in File|Preferences|Keyboard), and from then on, whenever you press F10, Expander tries to expand the "code" to the left of the insertion point.  If it can't recognise the code, Expander will either ignore it, or report "Not Found" depending on your Setup configuration.  For "AutoExpand", whenever you press a "white space" or "punctuation character", Expand will be triggered just as if you had pressed the hotkey.

Note that the Expand options (Expand, ExpandSimple, ExpandWithContext, and ExpandUnformatted) are only relative to this button.  To set the default, you must select the option in the "Setup" window.


Split
Expander:  Load Phrases

Select Load Phrases to convert a document  into code and data.  If the current document has text, you will be asked "Use Current Document".  If you choose "Yes", you will be asked "Syntax check {{ document?". If the current document is blank - or you answer "No" to "Use current document?", a dialog box will prompt you for a source filename.


load_phrases_source_file_creation
Load Phrases:  Source file creation

A source document consists of Preamble, Code, and Text.

The Preamble is any text before the first code, which will be ignored by the conversion process: only text after the first code will be added to the database.

Codes are any text between pairs of curly brackets on their own single line.

Text is any text any formatting following a code.

Below is a sample source document:

This text is preamble.  Because it is before any code it will be ignored by the conversion process.  It can take as many lines as you wish; the conversion process will begin at the first code.

{{code1}}

This is the text that will be expanded from code1.

{{code2}}

This is the second code's text.  Codes can consist of any alpha-numeric characters.

Text can consist of as many lines as you wish, and can have whatever character and layout formatting that you need.

{{exp}}

This is the text for the exp code.  Every code must begin on a new line, so therefore the hardreturn that finishes a block of text will not be included in the converted text.  If you want a hardreturn at the end of your text, insert two hardreturns before the next code.


load_phrases_source_file_syntax_checking
Load Phrases:  Source file syntax  checking

If you select "Yes" to "source file syntax checking", Expander will check through your source document to see if there are any single "{" or "}". You will be prompted if any are found, with the choice to "Add" another "{" or "}" or to delete to existing singular bracket.


Add
Expander:  Add

In Expander, select Add to add a code and phrase to the currently selected database.


Rename
Expander:  Rename

In Expander, select Rename to rename the currently selected code.


Replace
Expander:  Replace

In Expander, select Replace to replace the currently selected codes phrase.


Delete
Expander:  Delete

In Expander, select Delete to delete the currently selected code and its phrase.


Expand All
Expander:  Expand All

In Expander, select Expand All to expand the whole of the currently selected database to a new document window.  Note that the layout of the result is the Load Phrases file layout.


Delete All
Expander:  Delete All

In Expander, select Delete All to delete every code and text record in the currently selected database.


Setup
Expander:  Setup

Data file

Alias

Default

Lookup

Remove

Remove Database from Disk

Add

Prompt to Overwrite Duplicate Codes

Prompt on Not Found

Auto Expand

Ignore first character

Single letter codes

Expand to Variable

Setup Hotkey

Show intro screen

WordWrap in data window

Filter Right mouse click

Clipboard Options


Setting up Expander hotkey
Expand: Setup:  Setting up Expander Hotkey

To setup the Expander hotkey go to:

File/Preferences/Keyboard/Create (WPWin 6.0)

Edit/Preferences/Keyboard/Create (WPWin 6.1) enter a keyboard definition name and press enter.

Press the key that you want to activate Expander. Select Activate a Feature, then from the Features 	Categories list select Tools. From the Features list select Expander and then Assign Feature. You 	willnotice in the left hand window Expander is written besides the key you selected. Select Ok, then Select.


Expanding a code
Expand:  Expanding a code

Pressing the Expander Hotkey will expand the current word in the document.  If no change occurs, it might be because:

*	the code is not in the database: use Tools|Expander to check the contents of your databases.

*	in Expander Setup, Expand to Variable is checked.

See also

ExpandSimple

ExpandUnformatted


Case options
Expand: Case options

Expander can expand the current word in three different ways:

all lowercase

expand the current word as it is in the database.

first letter upper case

expand the current word and make the first letter upper case.

all upper case

expand the current word all upper case.

See also

Single letter codes

Ignore first character


Database Show/Edit
Expander:  Database Show/Edit

Select Database Show/Edit to switch between any of the listed Expander databases.


Alias
Setup: Alias

Enter an Alias for the database, when both a database file and alias have been entered, the Add button will be enabled.


Data file
Setup:  Data file

The path and filename of the database. If the file specified does not exist, the database will be created with that name. Before you can add a database, an Alias must be added.


Add a Database
Setup:  Add

Select Add to enter the nominated database and alias to Expanders list


Remove a Database
Setup:  Remove

Select Remove to delete a database and alias from Expanders list.


Default Database
Setup:  Default

The default database that expander will look up.


Lookup Additional Database
Setup:  Lookup

If the requested code is not found in the default database, Expander will look in any additional databases that are selected in the Lookup window.


Prompt to Overwrite Duplicate Codes
Setup:  Prompt to Overwrite Duplicate Codes

When splitting a source file, expander will prompt to overwrite duplicate codes if this option is checked.


Prompt on Not Found
Setup:  Prompt on Not Found

If this option is checked expander will display a dialog box with a message when a  code is  not found.


Auto Expand
Setup:  Auto Expand

Check this option to turn on Auto Expand mode.


Ignore first character
Setup:  Ignore first character

This option allows you to encase a code in brackets or quotes.


Single letter codes
Setup: Single letter codes

Initial capital

ALL UPPER


Expand to variable
Setup: Expand to variable

This options allows you to expand a phrase to a persistant macro variable "ExpandVar"


Show intro screen
Setup: Show intro screen

If this options is checked the "Expander Intro Screen" will be displayed upon the start-up of WordPerfect.


WordWrap in data window
Setup: WordWrap in data window

Check this option to turn on wordwrap in the Expander phrase data window.


Filter right mouse click
Setup: Filter right mouse click

Check this option to disable the "Right Mouse Click" features in WordPerfect


clipboard_options
Setup:  Clipboard Options

These options will Expand the selected code with\out formatting.  When choosing the buttons, the option you choose is relative to your next Expand, then it will go back to its default setting.  To change the default setting you must choose an option using the radio buttons, then choose "Set Default".  Once the default has been set, all codes expanded will be expanded with this option until the default is changed again.


Expand macro_commands
Expand:  macro commands

Macro Commands

Expand

ExpandSimple

ExpandUnformatted

Expander

ExpanderSetup

ExpanderLoadPhrases

AutoExpand

ExpandToVar

ExpandStatus

ExpandExecute

ExpandVar

ExpandWithContext


Macro Commands:  ExpandVar: persistant macro variable

This variable is used to pass information to and from Expander.


Macro Commands: Expand

Expand the given code as it is in the database


Macro Commands: ExpandSimple

Expand the given code using the current document format


Macro Commands: ExpandUnformatted

Expand the given code without any formatting


Macro Commands: Expander

Display the Expander interface window.


Macro Commands: ExpanderSetup

Display the Expander Setup window.


Macro Commands: ExpanderLoadPhrases

Split a source document into index and database


Macro Commands: ExpanderAutoExpand

Toggles Auto Expand On/Off

Note:	Displays a status window


Macro Commands: ExpandToVar

Toggles ExpandToVar (clipboard or persistant macro variable) On/Off

Note:	Displays a status window


Macro Commands: ExpandStatus

Returns the status of a given Expander function in "ExpandVar" persistant macro variable.

Usage:

ExpandVar="AutoExpand"

ExpandStatus

"AutoExpand"

returns On or Off

"ExpandToVar"

returns On or Off

"ExpanderDatabaseFile"

returns the default database file path and name

"ExpanderDatabaseFile::Default"

returns the default database file path and name

"ExpanderDatabaseFile::All"

returns a comma delimited string containing all database file path and names

"ExpanderDatabaseFile::1"

returns the database file path and name in the list of Expander databases specified by the number

"ExpanderDatabaseFile::NumberOfDBs"

returns a the number of databases selected

"ExpanderDatabaseAlias"

returns the default database Alias

"ExpanderDatabaseAlias::Default"

returns the default database Alias

"ExpanderDatabaseAlias::All"

returns a comma delimited string of all database Aliases

"ExpanderDatabaseAlias::1"

returns the database Alias in the list of Expander databases specified by the number

"ExpanderDatabaseAlias::NumberOfDBs"

returns the number of databases entered in Expanders list


Macro Commands: ExpandExecute

Executes the given Expander function in "ExpandVar" persistant macro variable.

Usage:

ExpandVar="AutoExpand"

ExpandExecute

"AutoExpand"

Toggle Auto Expand On/Off

"AutoExpand::On"

Turn Auto Expand On

"AutoExpand::Off"

Turn Auto Expand Off

"ExpanderDefDatabase::c:\tmp\test.dat"

Make "c:\tmp\test.dat" as the default database

"ExpanderDefDatabase::Private"

Make the database with the Alias "Private" the default database

"ExpanderDefDatabase::2"

Make the database specified by the number the default database

"ExpanderDatabaseSet::file-path-name"

Set default database with file-path-name

"ExpanderDatabaseSet::Public::file-path-name"

Set the database with the specfied Alias with file-path-name

"ExpanderDatabaseSet::2::file-path-name"

Set the database specified by the number with file-path-name

"ExpanderAliasSet::Alias::NewAlias"

Set specified database Alias with "NewAlias" using the Alias

"ExpanderAliasSet::file-path-name::NewAlias"

Set specified database Alias with "NewAlias" using the file-path-name

"ExpanderAliasSet::1::NewAlias"

Set specified database Alias with "NewAlias" using specified number

"ExpanderLookupSet::file-path-name::Yes/No"

Set Expander lookup table for specified database using file-path-name

"ExpanderLookupSet::Alias::Yes/No"

Set Expander lookup table for specified database using database Alias

"ExpanderLookupSet::1::Yes/No"

Set Expander lookup table for specified database using specified number

"ExpanderDatabaseAdd::file-path-name::Alias"

Add a database to Expander, the database will created if it does not exist

Lookup default is On

"ExpanderDatabaseRemove::file-path-name"

Remove a database from Expander using specified file-path-name

"ExpanderDatabaseRemove::Alias"

Remove a database from Expander using specified Alias

"ExpanderDatabaseRemove::1"

Remove a database from Expander using specified number

"DeleteAll"

Delete the contents of the default database

"ExpandAll"

Expand the default database

"ExpandToVar"

Toggle ExpandToVar On or Off

"ExpandToVar::On"

Turn ExpandToVar On

"ExpandToVar::Off"

Turn ExpandToVar Off

"RecordAdd::code::data"

Add a code and phrase to the default database

"RecordDelete::code"

Delete a code and phrase from the default database

"SaveToBif"

Save Expander settings to the private bif

note:

1. no status window is displayed.

2. ExpandToVar needs to be turned on to return an expanded phrase in ExpandVar persistant macro variable.


Macro Commands:  ExpandWithContext

Expand the given code using the formatting from which the code came.


Password
Expander: Password

Locked

The locked option shows you that the database is locked. This means that any changes to the database will require a password (if the database has been given a password).  Uncheck this option and enter the password to allow continuous editing.

Set Password

To set the password, choose "Set Password".  Enter your password and choose "OK".  Expander will then ask you to verify this password by asking you to type the password in again.  Choose "OK" and your database will now be locked.

To change an existing password; click on the "Locked" option, enter the existing password and choose "OK". Now choose "Set Password", type in the "New password" and choose "OK".  Expander then asks you to verify the new password.  Choose "OK" and the new password will now be locked.

To remove an existing password; click on the "Locked" option, enter the existing password and choose "OK".  Choose "Set Password", leave the password blank, and choose "OK".  To verify no password choose "OK" again.  The "Locked" option should now be unaccessible and ready to set a new password again.


Expand Options
Expand:  Expand Options

Expand

Expand the phrase as it is in the database

ExpandSimple

Expand the phrase using the existing formatting of the document.

ExpandWithContext

Expand the given code using the formatting from which the code came.

ExpandUnformatted

Expand the phrase without any formatting.


Installation_Macro
Expander Install:  Installation Macro

The Installation macro - expinst.wcm - can be used to install and de-install to private and public BIFs, to copy files or to a workstation only (no files copied).

Expinst.wcm can be run from within WordPerfect - or from Win 95 Explorer or from Windows File Manager if they know about ".wcm" files - to install and de-install Expander from the nominated BIF.  The entries "Delete Private Entry", "Override Private", and "Distribute to Private" are additional flags which can be written to a public BIF to control its relation to private BIFs.

"Remove Directory" deletes all files in the "Expander Installed to" directory so that the directory can be removed.


remove_database_from_disk
Setup:  Remove Database from Disk

When you delete a database from the database list using the "Remove" button, the database does not get deleted from the disk.  To delete the database from the disk, check the "Delete Database from Disk" option before choosing "Remove".