MessageService Reference

The messageservice ScriptQuery Overview. These tables are simple config files with a specific format.

Dictionaries and Tables

As described in the Message Tables article, message tables consist of a table and an optional dictionary. In modo 401 and earlier, table entries were represented only by numbers, and dictionaries were used to provide a more friendly alias for each numeric entry. As of 501, table entries can be any valid string, thus eliminating the need for dictionaries. However, some legacy tables may still use dictionaries.

Prior to modo 501, looking up a message in a table via a numeric identifier was done using the syntax ‘’@table@@id@’’, while looking up a message from a table’s dictionary was done through ‘’@table@dict@’’. As of 501, either method can be used for both identifier or dictionary lookups.


The service supports three attributes.

  • msgfind

  • msgsub

  • msgcompose

|msgfind|msgfind looks up a message given it?s table name and either a dictionary name or ID. The selector must be in the form of @table@@id@ or ‘’@table@dict@’’. |string |query messageservice msgfind ? @common@@2031@ |’’Buy modo now!’’ }}

{{SQAttributeTable |msgsub|Various messages may contain substitution keys, or arguments. These are represented by ‘’%1’’, ‘’%2’’, etc. within the message itself. msgsub replaces each successively numbered substitution key with the string provided, and returns the newly composed message. This attribute may be called repeatedly until all of the substition keys have been replaced. Note that you must have already selected a message with msgfind before querying this attribute. |string |query messageservice msgsub ? “my string” |’’Here we replaced the first argument with my string.’’ }}

{{SQAttributeTable |msgcompose|msgcompose is a combination of msgfind and ‘’msgdub’’. The first part of the selector is similar to msgfind, containing @table@@id@ or ‘’@table@dict@’’. Following that is a list of arguments, each wrapped in curly braces, with one for each ‘’%1’’, ‘’%2’’, etc. to replace. |string |<nowiki>query messageservice msgfind ? {@common@@20020@ {An example argument}}</nowiki> |’’Info: An example argument’’ }}

More Information