Skip to content

Archive Trac docs messagebox

madscatt edited this page Jun 20, 2026 · 1 revision

Docs Messagebox

Legacy Trac archive page imported from docs_messagebox. Source: https://genapp.rocks/wiki/wiki/docs_messagebox. Review age, links, and examples before treating as current.

message box

  • to get a message box include in your JSON output or JSON udp message:
"_message" : {
               "icon" : "myicon.png",
               "text" : "This is the message text"
             }
  • currently globally available icons are:

    • warning.png, information.png, skull.png, toast.png
  • you can add additional versions by placing them in the output/html5/pngs/ subdirectory

    • .png, .jpg, .gif and .bmp should be ok
  • CAVEATS

    • A reattach to a running job with a UDP _message as the last UDP will display the message on reattach.

Here is an example method implementing this in python communicating via UDP (can also be dumped at the end via JSON.

   def message_box(self,text,icon):

        _message = {}
        _message['icon'] = icon
        _message['text'] = text

        UDP_IP = json_variables['_udphost']
        UDP_PORT = json_variables['_udpport']
        sock = socket.socket(socket.AF_INET, # Internet
                socket.SOCK_DGRAM) # UDP

        socket_dict={}
        socket_dict['_uuid'] = json_variables['_uuid']
        socket_dict['_message'] = _message

        doc_string = json.dumps(socket_dict)
        sock.sendto(doc_string,(UDP_IP,UDP_PORT))

        return

where the method is called passing the error string

self.message_box(error,'warning.png')

Clone this wiki locally