Difference between revisions of "Ringhio Notifications Arexx Interface"

From wiki.amiga.org
Jump to navigation Jump to search
(Created page with "=Introduction= Your application / script may comunicate with Ringhio via an AREXX interface instead of using IApplication->NotifyA() =AREXX interface= Ringhio accept the f...")
 
Line 8: Line 8:
 
Ringhio accept the following AREXX commands:
 
Ringhio accept the following AREXX commands:
  
<pre style="color: black; background:lightgray; font-family:courier; width:100%">
+
<pre style="color: black; background:lightgray; font-family:courier; width:80%">
REGISTERAPP APP/K, AREXXPORT/K, ICON/K, TEXT/F - This command register a new application with the server
+
REGISTERAPP APP/K, AREXXPORT/K, ICON/K, TEXT/F
 
</pre>
 
</pre>
 +
 +
The command show above registers a new application with the server.
  
 
APP/K = application name (mandatory)
 
APP/K = application name (mandatory)
Line 23: Line 25:
 
The server will reply with one of the following messages:
 
The server will reply with one of the following messages:
  
<pre style="color: black; background:lightgray; font-family:courier; width:100%">
+
<pre style="color: black; background:lightgray; font-family:courier; width:80%">
 
OK, APP REGISTERED
 
OK, APP REGISTERED
 
ERROR: APP ALREADY REGISTERED
 
ERROR: APP ALREADY REGISTERED
Line 31: Line 33:
 
</pre>
 
</pre>
  
<pre style="color: black; background:lightgray; font-family:courier; width:100%">
+
<pre style="color: black; background:lightgray; font-family:courier; width:80%">
 
RINGHIO APP/K, UPDATE/S, CLOSEONDC/S, PRI/K, SCREEN/K, IMG/K, IMGVALIGN/K/N, LOGONLY/S, NOLOG/S, TITLE/K, BACKRXMSG/K, PAUSEBACKRXMSG/K,  STOPBACKRXMSG/K, PERCENTAGE/K, TEXT/F - This command send a message to the server to be displayed  
 
RINGHIO APP/K, UPDATE/S, CLOSEONDC/S, PRI/K, SCREEN/K, IMG/K, IMGVALIGN/K/N, LOGONLY/S, NOLOG/S, TITLE/K, BACKRXMSG/K, PAUSEBACKRXMSG/K,  STOPBACKRXMSG/K, PERCENTAGE/K, TEXT/F - This command send a message to the server to be displayed  
 
</pre>
 
</pre>
Line 70: Line 72:
 
The server will reply with one of the following messages:
 
The server will reply with one of the following messages:
  
<pre style="color: black; background:lightgray; font-family:courier; width:100%">
+
<pre style="color: black; background:lightgray; font-family:courier; width:80%">
 
OK, MSG QUEUED
 
OK, MSG QUEUED
 
ERROR: TOO MANY MESSAGES QUEUED
 
ERROR: TOO MANY MESSAGES QUEUED

Revision as of 12:39, 21 March 2017

Introduction

Your application / script may comunicate with Ringhio via an AREXX interface instead of using IApplication->NotifyA()


AREXX interface

Ringhio accept the following AREXX commands:

REGISTERAPP APP/K, AREXXPORT/K, ICON/K, TEXT/F

The command show above registers a new application with the server.

APP/K = application name (mandatory)

AREXXPORT = application AREXX port to be used in case of "back" message (optional)

ICON = full path to the application icon, without the ".info" appendix, to be used in the preference editor (optional)

TEXT = a short message describing the application purpose


The server will reply with one of the following messages:

OK, APP REGISTERED
ERROR: APP ALREADY REGISTERED
ERROR: NO APP NAME
ERROR: OUT OF MEMORY
ERROR: UNDEFINED ERROR
RINGHIO APP/K, UPDATE/S, CLOSEONDC/S, PRI/K, SCREEN/K, IMG/K, IMGVALIGN/K/N, LOGONLY/S, NOLOG/S, TITLE/K, BACKRXMSG/K, PAUSEBACKRXMSG/K,  STOPBACKRXMSG/K, PERCENTAGE/K, TEXT/F - This command send a message to the server to be displayed 

APP = application generating the message (application need to be registered first) (mandatory)

UPDATE = allows an application to delete all previous currently displayed or queued popup messages and show a new one with updated information

CLOSEONDC = the pop-up message may be closed upon double-clicking on it

PRI = priority of the message (from 0 to 10), notifications with a priority = 10 will remain on screen until the user explicity close it

SCREEN = name of the public screen where to show the pop-up message, if omitted it will use the WB screen. as additional parameter, could be used SCREEN=FRONT to use the front screen (optional)

IMG = full path to an image to be displayed within the pop-up message, max dimension 32 x 32, any format supported by datatypes (optional)

IMGVALIGN = vertical alignment for the image to be displayed within the pop-up message, the allowed values are: 0=TOP, 1=MIDDLE, 2=BOTTOM

LOGONLY = Informes the server to log the message, no pop-up will be showed

NOLOG = Informes the server to not log the message

TITLE = title of the text message to be displayed, will be rendered in BOLD (optional) Currently max 64 chars are displayed, if the text is longer it will be cutted.

BACKRXMSG = an AREXX message to be sent back to the calling application when double clicking on the pop-up message, the application need to provide an AREXXPORT when registering with the server (optional) In alternative, it's possible to open an url into a browser, just use it that way: BACKRXMSG="URL:http://www.yoururl.net" In this case, an AREXX Port isn't needed but requires launch-handler or OpenUrl installed.

PAUSEBACKRXMSG = an AREXX message to be sent back when the user click on the PAUSE button, the PAUSE button will be displayed when this back message is specified

STOPBACKRXMSG = an AREXX message to be sent back when the user click on the STOP button, the STOP button will be displayed when this back message is specified

PERCENTAGE = show a notification message with a progress bar, (value from 0 to 100)

TEXT = text message to be displayed, currently max 160 chars are displayed, if the text is longer it will be cutted.


To be noted, the server may reject incoming messages if there are too many messages in queue, or if there are other errors such has low memory etc.

The server will reply with one of the following messages:

OK, MSG QUEUED
ERROR: TOO MANY MESSAGES QUEUED
ERROR: APP NOT ALLOWED
ERROR: APP NOT REGISTERED
ERROR: NO APP NAME
ERROR: OUT OF MEMORY
ERROR: UNDEFINED ERROR

Check the rx_testringhio.rexx script in the archive for a basic example on how register your app with Ringhio, show pop-up messages, or log a message.