1-2-3 Release 4 Macro Translator
 Macro Translator

Use the Macro Translator in a .WK3 file to translate each {ALT} keystroke command and its arguments to the fully qualified Release 4 equivalent. The Macro Translator leaves all other data in the file unchanged.

Note  If you are translating complex macros or macros that were written by someone else, document the macros before you translate them. If someone else wrote the macros, have that person document them.

For information about documenting macros, see the User's Guide, Chapter 26, "Using Macros to Automate Your Work."

1.	In the Windows Program Manager, open the Lotus Applications window (or the group window that contains the Macro Translator).

2.	Double-click the application icon.

The 1-2-3 Release 4 Macro Translator window appears.

3.	Use the "Directories and Drives" list box at the top right of the window to find the files to translate.

4.	Select one or more files.

To select multiple files, select the first file and then CTRL+click each additional file.

To select a contiguous range of files, select the first file and then SHIFT+click the last file.

5.	If you want 1-2-3 to put the translated files in a different directory, select a drive or directory under "Directory for translated files."

If you translate the files in their current directory, the Macro Translator creates a backup copy of each file with a .BK3 extension before translating it.

6.	Choose Translate.

The Macro Translator translates the files and creates a file called 123WXMAC.LOG, which lists the translated files and information about translation problems.

The Macro Translator puts the log file in the same directory as the translated files.

After you finish translating the files, use the Notepad accessory or a word processing program such as Ami Pro to view the log file. If necessary, edit any untranslated macros in 1-2-3 Release 4. Then run each translated macro to check that it works correctly.

See also

Help

Macro Translator Messages

What's New

Chapter 6, "Macro Compatibility," for more information about translating macros


Macro Translator Messages

To see Help for a specific Macro Translator message, select the message.

Buffer stack was exceeded

Cannot open input file ("file_name")

Cannot open log file ("file_name")

Cannot open output file ("file_name")

Cannot open product model file ("file_name")

Cannot open translate model file ("file_name")

Cannot translate range "name"

Context stack depth was exceeded

Context stack underflow

Destination cell in {DISPATCH} is invalid or missing

Destination for branch is invalid or missing

Duplicate cell in worksheet

Error writing to output file

Existing backup copies will be written over. Continue translation?

File is password protected

Input file is not .WK1 or .WK3

It is recommended that you close any .WK3 files you plan to translate

Location in {FOR} is invalid or missing

Location in {MENUBRANCH} or {MENUCALL} is invalid or missing

Location in subroutine call is invalid or missing

Macro may be self-modifying -- cannot translate text formula

No input file was supplied

Not enough memory is available

Range "range" is invalid

Range selection not permitted from within a macro

The target directory is write-protected

Too many ("number") files selected. Only "number" will be translated.

Translated cell ("cell") is too long

Translated files will write over originals. Create backup copies and continue?

Translated files will write over files with the same name. Continue translation?

Translated "number" files

Translation creates a blank cell

The translation of this cell must be completed manually

The translation may be inaccurate

Unknown menu key ("letter") it is ignored

Unknown range given as argument ("range")

Use of {?} in Menu mode may create incorrect translation

Worksheet record too large


Translated files will write over originals. Create backup copies and continue?

You did not specify a new directory for the translated files.

The Macro Translator gives the translated files the same names as the original files and creates backup files (.BK3) of the original files.


Existing backup copies will be written over. Continue translation?

Backup files (.BK3) for the files you want to translate already exist in this directory. You might have already translated these files. If you continue translation, the original {ALT} keystroke macros in the backup files will be lost.

Select another directory for the translated files.


Translated files will write over files with the same name. Continue translation?

Worksheet files (.WK1 or .WK3) and backup files (.BK3) for the files you want to translate already exist in this directory. You might have already translated these files.

Select another directory for the translated files.


Too many ("number") files selected. Only "number" will be translated.

You selected more than 1,024 files to translate.

The Macro Translator can only translate up to 1,024 files at once.


Translated "number" files

The Macro Translator translated macros in the number of files specified in the message.

See Macro Translator for information about reading the log file and testing the translated macros.


The target directory is write-protected

The directory you selected for the translated files cannot be used to save files. Select a different directory or remove write-protection from the selected directory with the Windows File Manager File Properties command.

If the directory is on a network server, ask your network administrator to give you write permissions for the directory.


Cannot open log file ("file_name")

The Macro Translator could not write data to the log file for one of the following reasons:

• 	The file was in a directory that contained the maximum number of files.

Delete some files from the directory, or specify a directory that contains fewer files.

• 	There is not enough disk space to save the log file.

Delete some files from the directory, or specify a directory on a drive that has more disk space.


Cannot open translate model file ("file_name")

The file specified in the message is missing or damaged. You must reinstall the Macro Translator.

See Chapter 1, "Before You Begin," in the User's Guide for information about returning to Install to install optional features.


Cannot open product model file ("file_name")

The file specified in the message is missing or damaged. You must reinstall the Macro Translator.

See Chapter 1, "Before You Begin," in the User's Guide for information about returning to Install to install optional features.


Cannot open input file ("file_name")

The Macro Translator cannot open a file you specified for translation.

• 	The file may be missing or damaged.

• 	The file may be in a directory on a drive that is unavailable.


Cannot open output file (filename)
Cannot open output file ("file_name")

The Macro Translator could not open the output file for one of the following reasons:

• 	The file may be missing or damaged.

• 	The file was in a directory that contained the maximum number of files.

Delete some files from the directory, or specify a directory that contains fewer files.

• 	There is not enough disk space to save the translated files.

Delete some files from the directory, or specify a directory on a drive that has more disk space.


File is password protected

You tried to translate a sealed file.

In 1-2-3, choose File Protect and deselect the "Seal file" check box to unseal the file. You must know the password that was used to seal the file in order to unseal it.


Input file is not .WK1 or .WK3

You tried to translate files that are not in .WK1 or .WK3 format.

To translate macros in a file that is in another format, open the file in 1-2-3 Release 4 and save it in .WK3 format.


Error writing to output file

The Macro Translator could not write data to the file for one of the following reasons:

• 	There is not enough memory to save the translated files.

For more information on increasing available memory, see Appendix B, "Using Memory Efficiently," in the User's Guide.

• 	There is not enough disk space to save the translated files.

Delete some files from the directory, or specify a directory on a drive that has more disk space.


Not enough memory is available

You must free enough memory to run the Macro Translator.

For more information on increasing available memory, see Appendix B, "Using Memory Efficiently," in the User's Guide.


Translated cell ("cell") is too long

The Macro Translator tried to translate an {ALT} keystroke macro, but the resulting macro contains more than 512 single-byte characters.

When you write the new macro command, instead of entering text arguments as text enclosed in " " (quotation marks), enter them as the names or addresses of cells that contain labels.


Duplicate cell in worksheet

A file you specified for translation is damaged.


Range "range" is invalid

A file you specified for translation is damaged.


Cannot translate range "name"

A file you specified for translation is damaged.


Context stack depth was exceeded

The Macro Translator cannot translate macros that contain subroutine calls or branches to more than 100 different ranges.

Before you translate these macros, edit them by removing some {subroutine} or {BRANCH} commands.

After the file is translated, replace the {subroutine} or {BRANCH} commands and run the translated macros in 1-2-3 Release 4 to make sure they work correctly.


Context stack underflow

An internal error occurred.

Record the error message and contact Lotus Customer Support.


Buffer stack was exceeded

The Macro Translator cannot translate macros that use more than 128 buffers.


Translating a file that is open in 1-2-3 will cause unpredictable results. Continue translation?
It is recommended that you close any .WK3 files you plan to translate

You started the Macro Translator while 1-2-3 was running.

Make sure no files you want to translate are currently open in 1-2-3. Return to 1-2-3 and choose File Close to close the files before you translate them.


No input file was supplied

You did not specify any files to translate.

See Macro Translator for information about specifying files to translate.


Worksheet record too large

A file you specified for translation is damaged.


Macro may be self-modifying -- cannot translate text formula

The Macro Translator cannot translate macros that modify themselves.

Edit these macros before you translate them. For example, the following macro opens the file whose name is stored in the cell named FILENAME:

+"{ALT}fo"&FILENAME&"{TAB 4}~"

When you change the contents of FILENAME, the macro changes also. To translate this macro, substitute the actual name of the file you want to open, instead of concatenating the contents of a named range.

After this macro is translated, you can use the {CHOOSE-FILE} macro command to let the user specify which file to open.


Translation creates a blank cell

The translation of this {ALT} keystroke macro produces a blank cell. Run the translated macro in 1-2-3 Release 4 to make sure it works correctly.


Use of {?} in Menu mode may create incorrect translation

The Macro Translator cannot translate macros that ask for user input when 1-2-3 is in Menu mode.

Edit these macros before you translate them. For example, the following macro displays the File Open dialog box and waits for the user to specify a file and choose OK:

{ALT}fo{?}

To translate this macro, substitute the actual name of the file you want to open, instead of relying on user input.

After this macro is translated, you can use the {CHOOSE-FILE} macro command to let the user specify which file to open.


The translation may be inaccurate

The translation of this {ALT} keystroke macro may not produce the results you intended. Run the translated macro in 1-2-3 Release 4 to make sure it works correctly.


The translation of this cell must be completed manually

The Macro Translator either could not translate this macro command or was able to provide only an approximate translation, because the command has no equivalent functionality in 1-2-3 Release 4.

Use 1-2-3 Release 4 Help to find a macro command that automates the task you want to accomplish. To see categories of macro commands in 1-2-3 Release 4 Help, search on "macros," and then select the topic "Macro Command Categories."


Unknown menu key ("letter") it is ignored

In an {ALT} keystroke macro, a letter was specified that was not the underlined letter of a command.

For example, suppose a macro was meant to delete a graph name. The correct command is {ALT}GMD (M is the underlined letter in the command Name.) A common error, however, would be substituting the first letter of the command (n) for the underlined letter.


Location in {MENUBRANCH} or {MENUCALL} is invalid or missing

For a {MENUBRANCH} or {MENUCALL} command, the location argument either was missing or did not evaluate to a range name or address.

Edit the original macro and then retranslate the file.


Destination for branch is invalid or missing

For a macro command that branches to another macro routine, the branch-location argument either was missing or did not evaluate to a range name or address.

Edit the original macro and then retranslate the file.


Location in {FOR} is invalid or missing

For a {FOR} command, the subroutine argument either was missing or did not evaluate to a range name or address.

Edit the original macro and then retranslate the file.


Location in subroutine call is invalid or missing

For a macro command that calls a subroutine, the location argument either was missing or did not evaluate to a range name or address.

Edit the original macro and then retranslate the file.


Destination cell in {DISPATCH} is invalid or missing

For a {DISPATCH} command, the location argument either was missing or did not evaluate to a range name or address.

Edit the original macro and then retranslate the file.


Unknown range given as argument ("range")

For a macro command that requires a location argument, the argument did not evaluate to a range name or address.

Edit the original macro and then retranslate the file.


Range selection not permitted from within a macro

An {ALT} keystroke macro used a directional key name, such as {UP} or {DOWN}, to specify a range.

In the translated macro, use {SELECT-RANGE-RELATIVE} to specify a range using offsets of the current cell.