Sending complex messages
A really helpful feature of SOS max is the message highlighting. SOS max has a lot of predefined highlighting types called keys.
The usage of these keys is quite simple.
socket.send("!SOS<showMessage key='error'>The Message!</showMessage>\n");
The command line must start with the keyword „!SOS” and is followed by a XML command. The highlighting type to use (e.g. error) is value of key.
SOS max has a lot of predefined keys which are fully customizable via the graphical interface. Furthermore, it provides the ability to create own keys. Therefore, the command setkey can be used.
sock.send("<setKey><name>MyKey</name><color>" + 0xffcccc + "</color></setKey>\n");
sock.send(<showMessage key='MyKey'>Hallo1!</showMessage>\n");
Another powerful feature within SOS max is the folded message. Sometimes, it might be necessary to put out larger messages for a better debugging context. In SOS max, such a multiline messages can be display as a single-line entry which shows up the whole message block by clicking on it and hides it by a second click. This feature is called folded message and ensures clearer and more structured views.
sock.send("!SOS<showFoldMessage key='MyKey'>"
+ <title>foldMessage1</title>"
+ "<message>This is a multiline message:\nShow some Object...\n\ta:1,\n\tb: 2</message>"
+ "</showFoldMessage>");
To clear the console and to start with an empty screen, the clear command has to be send to SOS max.










