Skip to content

NC Names

LeonaMorro edited this page Jun 9, 2017 · 9 revisions

.init NC

This NC will be read and executed once after a script reset. Here you can define initial values (like global options) for your object. It should contain at least the DEFAULTCARD command. You have to reset your scripts if you make changes to the cards content.

Menu NCs

Definitions

NC Name: is the name of the NC in the object inventory. It consists of the path and optional permissions.

Path: the first part of the NC Name. It consists of a prefix and one or more Button Names separated by a :. The path has to be unique. You must not use multiple NCs with the same path.

Prefix: always SET

Button Names: whatever you want. Example: SET:Female:sitting will create a Button (Submenu) Female. Inside the Female Submenu you will find a Button sitting

Permissions: If you use permissions you can hide buttons in special cases. See Button-Permissions

special strings

Note: special strings can't be nested.

Comments

A comment is a string enclosed by /* and */. Comments may be used in Button Names and are part of it. They will not be shown in a menu.

Example1 (sorting the menu):

SET:/*1*/Button B
SET:/*2*/Button A

will generate a menu with two buttons: "Button B" and "Button A"

Example2 (multiple Buttons that will look identical):

SET:/*Comment1*/Button
SET:/*Comment2*/Button

will generate a menu with two buttons: "Button" and "Button"

BASE64 encoded string

NC names can't contain any char, so it is impossible to use umlauts or any UFT chars inside the name. As a workaround you may use a BASE64 encoded string. The BASE64 encoded string have to be enclosed in /$ and $/. It can be used in Button Names and it becomes part of it. Inside the menu the string will be decoded.

Example1:

SET:M/$w7w=$/nchen
SET:I /$4p2k$/ nPose

will generate the Buttons "München" and "I ❤ nPose".

Note: Please keep in mind that some UFT chars are using up to 4 Bytes and the amount of bytes for each Button is limited to 24Bytes (LSL Limitation). Additionally nPose also needs one or more Bytes to work correctly. That means that in the worst case the button name will be truncated to 5 (or fewer) characters.

Macros

Macros have to be enclosed by /@ and @/. Whenever the menu is created, the macro gets recursively parsed. It can be used inside Button Names and Permissions (and the MENUPROMP and some Menu plugins). If used inside a Button Name it becomes part of it. The value of a macro has to be defined using the MACRO command.