fr:code:system:notify
Ceci est une ancienne révision du document !
Table des matières
Notify [En cours de Traduction Wismerheal][WSL]
Cet objet vous permet d'envoyer des notifications système. Cela ne fonctionne que sur GNU/Linux.
Fonctions
Notify
Fonction de construction.
Syntaxe
var myObject = new Notify();
var myObject = new Notify(parameters);
Arguments
- parameters - (object) les paramètres de message
- title - (string) le titre de la notification
- text - (string) le texte de la notification
- icon - (string) le nom de l’icône de la notification ou le chemi vers le fichier image (voirhttp://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html)
- timeout - (integer) the notification's timeout. It is ignored on some OSes like Ubuntu
Example
var myObject = new Notify();
var myObject = new Notify({ title: "Hello", text: "Hello automation world!" });
Methods
show
Shows the notification.
Syntax
myObject.show();
myObject.show(parameters);
Arguments
- parameters - (object) the message parameters
- title - (string) the notification's title
- text - (string) the notification's text
- icon - (string) the notification's icon name or path to an image file (see http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html)
- timeout - (integer) the notification's timeout. It is ignored on some OSes like Ubuntu
Returns
- (Notify) this Notify
Exceptions
- (NotificationError) unable to show the notification
Example
myObject.show();
myObject.show({ title: "Hello", text: "Hello automation world!" });
Notes
If you want to update a notification's text re-use a single Notify object and call show to change the text.
fr/code/system/notify.1332512134.txt.gz · Dernière modification : 2021/02/13 11:23 (modification externe)