Page tree
Skip to end of metadata
Go to start of metadata

This setting enables Genie to detect menus based on regular expressions.

By default, Genie decides that a field is a menu if the contents of an output field match a certain pattern. For instance, a menu is detected if: the field begins with a number, followed by a decimal, followed by some text (e.g. "90. Sign off").

This configuration option, pui["menu pattern"], overcomes the limitations of Genie's default detector:

  • Other separator characters besides period (.) can be used.
  • Menus are detected if the text is output in up to 3 output fields.
  • Menus can have spaces before the separator character.

After this regular-expression based detector executes, the default Genie menu detector runs if pui.genie.config["detectMenus"] is true.

 

pui["menu pattern"] must be a regular expression with 3 capturing groups in this order:

  • Group 1 contains the menu option character.
  • Group 2 contains the separator character: -, =, :, etc.
  • Group 3 matches part of the menu description: User Tasks, Office Tasks, etc.
pui["menu pattern"] = "([0-9]{1,2}) ?([.:-]) ?(\\S+)";

The example pattern detects menus starting with 1 or 2 digits, followed by one or no spaces, separated by a period or colon or dash, followed by one or no spaces, and followed by one or more non-white-space characters.

Where do you save this configuration option?  Here.

Menus are only detected if there are other menus in approximately the same column. For example, in the image below the 3rd row shown begins 1 column to the left of the others:

Thus, the field on the 3rd row is close enough to the others' columns, and all are changed to menu links.

In the image below, the fields on the 2nd row are 2 columns away from the other columns. Since no other menus start in those columns, those fields are not converted to menus:

By default, there can be text in rows between matches in the same column, and the fields are converted to menus.

You can specify this option to require blank spaces between fields that match your pattern:

pui["menu pattern mode"] = 1;

Then if there is text between a potential match and another potential match, the match fails:

The pui["menu pattern"] configuration option is available with Profound UI Version 5, Fix Pack 6.0.

Alternate Syntax
pui["menu pattern"] = /([0-9]{1,2}) ?([.:-]) ?(\S+)/ig;

The alternate syntax is available after Profound UI V6 FP2.0. It permits you to set the pattern to a RegExp object, allowing you to avoid confusion escaping certain characters, such as the backslash (\).

 

  • No labels