ONOTIFY.$sendlocal()

Function group Execute on client Platform(s)
ONOTIFY NO All

Syntax

ONOTIFY.$sendlocal(cTitle,cMessage,vImage,iAction,wUserInfo,[iDelay=0,&cErrorText])

Description

Sends a local operating system notification. Returns character notification id for success or returns #NULL (and cErrorText) if an error occurs.

If the call to $sendlocal() succeeds, it returns a character string. This is a string that uniquely identifies the notification. You can use this string to remove the notification from the system Notification Center using $removelocal, if for example the notification is no longer relevant.

The parameters are as follows:

Parameter Description
cTitle The title of the notification. Some text, displayed in bold font above the main notification text. The operating system will truncate this if it is too long. Windows allows this to occupy two lines, if you separate the lines using either kCr, lLf or kCr kLf. macOS only allows a single line
cMessage The text of the notification. This is the main notification message, displayed in a plain font. The operating system will truncate this if it occupies more than 4 lines, either due to word wrapping, or the presence of newline characters (kCr, lLf or kCr kLf)
vImage Image(s) to be displayed with the notification. See the ‘Specifying Images’ section
iAction A value that specifies up to 2 optional actions that are to be included in the notification; on Windows, this is via one or two buttons; on macOS, this is either via a button for a single action, or via an options popup for two actions. A ‘Specifying Actions’ section
wUserInfo A row containing user information that is passed to the $localnotify() method when the user clicks on the notification or a notification action. It must be possible to convert $userinfo to JSON. See section ‘Handling Notification Clicks’
iDelay The delay in seconds between the call to $sendlocal() and the notification being delivered (optional). Omnis can quit before the notification is delivered, as the operating system takes care of deferred delivery
cErrorText A character variable that receives text describing an error if $sendlocal() fails