Example of a working menu:

{
  "rootname": "Links",
  "rooticon": 196,
  "items": 11,
  "item1": {
    "name": "Sales requests",
    "icon": 173,
    "type": "open-link",
    "data": "https://mycompany.com/kanban/#project=74"
  },
  "item2": {
    "type": "hr"
  },
  "item3": {
    "name": "iOS bugs",
    "icon": 173,
    "type": "open-link",
    "data": "https://mycompany.com/kanban/#project=48"
  },
  "item4": {
    "name": "Android bugs",
    "icon": 173,
    "type": "open-link",
    "data": "https://mycompany.com/kanban/#project=25"
  },
  "item5": {
    "name": "Kanban bugs",
    "icon": 173,
    "type": "open-link",
    "data": "https://mycompany.com/kanban/#project=3"
  },
  "item6": {
    "name": "Blue flag (server script)",
    "icon": 172,
    "type": "server-script",
    "data": "OpenPrivateSupport",
    "params": "%username% :)"
  },
  "item7": {
    "name": "Tree example"
  },
    "item8": {
      "parent": "item7",
      "name": "Red flag (action link)",
      "icon": 177,
      "type": "exec-action",
      "data": "about",
      "params": ""
    },
    "item9": {
      "parent": "item7",
      "name": "Pill icon (Open help topic)",
      "icon": 185,
      "type": "open-help",
      "data": "mychatclientwindows"
    },
  "item10": {
    "name": "Disabled item",
    "enable": false
  },
  "item11": {
    "name": "Open text file",
    "type": "open-link",
    "data": "F:\\Public\\docs\\guide for techs.txt"
  }
}


Important Names of the parameters and their type must be specified in lowercase exactly as in the table below because it matters.

Mandatory items

Parameter

Type

Description

rootname

string

string, name of the menu root element that will be visible in MyChat Client main menu;

rooticon

integer

icon index in a ready list;

items

integer

total number of menu items. They are titled as "item1", "item2", "item3", and so on. Numeration starts from 1, no gaps allowed.


Nested items

All nested menu items have mandatory name "item" and number, for example, "item15". Order does not matter, you can list items as convenient for you. Just remember, that the number of items must not be less than it's specified in the parameter "items".

Parameter

Type

Description

name

string

menu item name, text string;

parent

string

if this parameter is absent, then menu item will be in the root section, if present, then specify parent section, for example, "item12";

icon

integer

icon index from a ready list;

type

string

menu item type, possible variants:

  • hr — horizontal delimiter line in menu;
  • open-link — open the link in a browser;
  • server-script — run the script on the server;
  • exec-action — execute action from the available list of action commands;
  • open-file — open file: local or network;
  • exec-app — run local application, send parameters;
  • exec-cmd — run client console command, send parameters;
  • open-help — open Help on a specified section;

data

string

content that work in a command:

  • open-link — URL, link text;
  • server-script — script name on the server;
  • exec-action — action name;
  • open-file — full path to opened file;
  • exec-app — full path to application that you need to run;
  • exec-cmd — name of the MyChat Client console command;
  • open-help — name of the MyChat Help section, for example, "userscustommenutool" (without path and a dot with html-file extension, the application will figure out how to open it and in which language);

params

string

  • server-script — parameters for a script, optional;
  • exec-action — parameters for для action, optional;
  • exec-app — parameters to run application, optional;
  • exec-cmd — parameters for console command, if any;

enable

boolean

if  "false", then menu item is displayed as inactive (disable) and it is not clickable. It is convenient when you need to temporarily forbid some item without removing it from a JSON file.