Salesforce

Building the Menu (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

Building the Menu (Magic xpa 3.x)

The Tools menu definition is loaded with the Magic xpa Studio. Any modification of the [TOOLS_MENU] section in the Magic.ini file takes effect only after restarting Magic xpa.

The menu entry order in the Tools menu and submenus are determined by the order the menu entries are entered in the [TOOLS_MENU] section.

The Tools menu entry is defined in the Magic.ini file by the following syntax:

Menu Name = menu type, menu caption, parent menu name, ECF path\command, access key, pre-operation command file, post-operation command file, image for tool number and tool group

If the Tools menu syntax is invalid, the option is not displayed in the menu.
If there are no valid tool entries found, the Tools menu is not displayed.

Menu Type

There are four different types of items that can be put on the menu. You select one of the characters below to specify a tool type:

A

Application

This option creates a menu entry that activates a Magic xpa tool application (a Magic xpa .ecf file). When an .ecf file is opened, there can be pre- and post- scripts that allow you to do macro-type processing.

O

OS Command

This option creates a menu entry that activates a defined operating system command, such as a batch file or executable.

M

Submenu

This option creates a submenu entry point.

S

Separator

This option creates a menu separator.

For example: Menu4=A

Menu Caption

The menu caption lets you define a menu name.

The menu caption can include an ampersand character (&) to set the accelerator key. The menu caption is mandatory for Application, OS command, and Submenu entries but is not required for the Separator.

Parent Menu Name

A string defining the parent menu. If the Parent Menu Name parameter is empty, the menu caption appears in the Tools menu.

ECF Path and Command

When the menu type is Application, the ECF Path/Command parameter must specify the location of the application tool file.

For example: Menu2=A,Magic Wizard, ,%Tools%Wizard.ECF,

Before a Magic xpa cabinet file (ECF) project is loaded, the current project will be closed. The general information about the project is set as global parameters.

If no ECF path is defined, the menu entry is regarded as invalid and will not be displayed in the Tools menu.

When the menu type is OS Command, the ECF parameter specifies the OS command to be executed.

For example: Menu7=O,Notepad, ,notepad.exe,

Logical names are supported for both the ECF Path and Command parameters.

Access Key

This parameter lets the developer assign an access key of the defined menu entry. This is an optional parameter that applies only to Application and OS Command menu types.

For example: Menu7=C,Notepad, , notepad.exe,Ctrl+1

Pre-Operation Command File

The file name that lists a sequence of operations to be performed before the current application is closed. For information about the command operations, see Operation Commands. This parameter supports logical names.

Post Operation Command File

The file name that lists a sequence of operations that will be performed before the current application is reloaded after the tool application closes. For information about the command operations, see Operation Commands. This parameter supports logical names.

Reference
Attachment 
Attachment