Readme: | Version: 1.13
MagicBeacon for MorphOS -----------------------
What the hell is MagicBeacon? -----------------------------
MagicBeacon is part of the MagicAction package, which is released as separate product. MagicBeacon is a highly configurable notification and messaging system. Let me ask you some questions first:
Ever wanted the images drawer of your cameras picture card to be opened automatically when connecting your camera?
Ever wanted a DVD to be played automatically?
Ever wanted to see incoming EMails in a scrolling messenger on your screen?
Ever wanted to start a backup of your system by plug in the backup drive?
This is just a small number of possible ways to use MagicBeacon, even I cannot imagine.
Ideas for future enhancements are welcome.
Requirements ------------
MorphOS 2.7 is strongly advised. MorphOS 1.x versions are not supported.
Features --------
- Full featured Magic User Interface (MUI) - localized - detects disk insert and removal of specific devices. - detects disk changes of drawers and files - detects specific drawers and file on media - Full featured and highly configurable screenbar module which supports scrolling, center, leftalign and auto modes to enable scrolling only if the message text does not fit into screenbar space. - Full featured bubble display using display engine and alpha support for blending effects. - Allows multiple actions on a single notification. - Application interface allows developers and users to create their own notifications.
Installation ------------
Just double click the tool icon and there it is.
Predefined settings are already in place, so inserting your cameras media card may already pop up its window. Inserting a disk in cd0: will cause the ticker to inform you about the process. If the disk is a DVD movie and MPlayer is installed in Applications, then the movie should start to play.
You may not want to open preferences window on any start, so just edit the icons tool types and set CX_PopUp to FALSE. Drag the icon into wbstartup to auto launch.
The included catalog files can simply copied over to SYS:Locale/Catalogs/.
Screenbar ---------
To configure the screenbars look, use the standard mui preferences for the screenbar. It can be found my right clicking on the depth gadget of each screen.
The screenbar will only be available if there is a action type using the screen bar defined in notification list or the SCREENBAR tooltype is set to TRUE.
Textbox/Bubbles ---------------
By default there is one buildin text box skin. It is possible to add an unlimited number of textbox styles. Text box backgrounds are simple 48x48 pixel images in ARGB format. You can also use alpha shading to make the box transparent. Each box is split into 9 elements with 16x16 pixel size each:
123 456 789
The box generator is repeating 2, 4, 6, 8 and 5 to enlage the box, so you need to ensure that the box will look nice when those elements get regrouped. A rearranged box may look like these:
:12223 122223 :45556 or 455556 :78889 455556 : 788889
Once you created a nice bubble or box in the 48x48 format. Save your image and do not forget to configure your painting tool to store the alpha channel. Use the common tool "dt2raw", which can be found on Aminet, to extract the image data. If it is done right, the result will be a 9216 byte sized file. Copy this file to "SYS:Prefs/Applications/MagicBeacon/Bubbles/" and add the extension ".rawbub" to its name. Once you restart MagicBeacon your background will be available in settings.
If you made a nice bubble, then feel free to send it in.
Basics ------
We have notification on one side and actions on the other. MagicBeacon just connects them in the way the user wants to.
Notifications are media insert and removal, file or directory modifications, incoming email, new RSS feeds and much more. There is no limit.
Actions are commands launched or a ticker message displayed in screenbar.
MagicBeacon was designed to deal with all kind of system signals, as there is no way to catch them for an ordinary user. The user can use the application interface port. It can be accessed by shell, by rexx or if a developer supports MagicBeacon it works without any complicated user interaction.
The goal was to keep it easy for the user. So there is only one thing you need to know. Who is sending something what? If an application supports MagicBeacon it should provide a list of notifications in their documentation.
Developers are advised to use applicationname.notificationname for their notifications. For example "SUPERMAIL.NEWMAIL". Supporting this simple rule will result in nice enhancements in the future. Developers should study the included documentation.
The only thing the user needs to do to pick up such a notification is adding a new entry to the list and select "NEWMAIL" from the pop up list. If he wants to limit the incoming mail notification to the "SUPERMAIL" application he modifies the type to "SUPERMAIL.NEWMAIL". Thats all he needs to know and do.
ARexx -----
Some rexx scripts are already available in the Arexx drawer. If you can provide useful new rexx scripts for other applications to interact, then feel free to sent them in.
Rexx Commands -------------
Name: Ticker Template: MESSAGE/A,CENTER/S,LEFTALIGN/S,AUTOCENTER/S,AUTOLEFTALIGN/S, SCROLLING/S,DURATION/N,PRI/N Description: Display a given message in title screen bar.
Name: Bubble Template: MESSAGE/A,FONT/K,SKIN/K,COLOR/K,X/N,Y/N,CENTER/S,MOUSE/S,DURATION/N" Description: Display a given message in text box form.
Name: SendBeacon Template: MESSAGE,NAME=CMD/K Description: Send a beacon to application interface port. The default beacon name is "SENDBEACON"
Shell Commands --------------
Easier than Rexx for normal usage is the shell. Currently the following commands are included by MagicBeacon:
Name: SendBeacon Template: MESSAGE,NAME=CMD/K,QUICK/S Description: Sends a notification to the application interface port. The default beacon name is "SENDBEACON"
Examples: SendBeacon "It works".
All actions configured to listen to the application interface port having set their configuration string to "SENDBEACON" will be executed.
SendBeacon CMD "TICKER MESSAGE Hello SCROLLING DURATION 20"
Display the message Hello for about 20 seconds.
SendBeacon CMD "BUBBLE MESSAGE Hello MOUSE DURATION 5"
Display the message Hello for about 5 seconds using a text box. All Rexx-Commands can be send in this way.
Settings --------
Adding new notification is quite easy. Press the new button, select a notification type from list and setup the action which should be caused by the new entry. Some notifications need a configuration string. Thats mostly a device, file or path name.
Just keep an eye on the various help bubbles and information texts and you will get all the help you need.
There are some things you should know about, too. I will explain them here, too.
If you setup an action type with the notification type "Another Action" it will be executed along with its predecessor. This allows to cause several actions by only one incoming notification.
For the command and the screenbar message several placeholder can be used to hand over the detected notification data to the launched tool or to display the information in text.
%p is the path. It's the device you inserted the media followed by the configuration string as path. So inserting a CD in "CD0:" and using "images" as configuration will result in "CD0:images"
%d is the drive. It's simply the device you inserted or removed the media. e.g. "CD0:"
%D is the configuration itself. e.g. "DCIM"
%m is the message which came along with the notification.
Additional ----------
You may ask why there aren't any more action types. Well, the answer is quite simple. Why implementing something that the system already has build in and can be used without wasting time and memory. The most powerful system tool is the "open" command. It handles all mime types configured in Ambient.
open www.geit.de -> launches the default browser and shows the web page open bing.iff -> plays the sample open image.jpg -> display the picture
Using "open %p" will open the detected drawer.
For playing samples the "play" command may be a better choice as it does not add any controls to the screenbar.
Use e.g. "execute %p" with the "Mediafile" notification and a configuration set to e.g. "MorphOS.autorun" file name and inserting a CD or USB stick with such script on it, will execute that script.
Auto run on media insert. Wasn't that hard, wasn't it?
I have a few additional action types in mind and will add them in future updates.
MagicBeacon is designed to support MagicAction scripts. MagicAction provides a powerful way of dealing with multiple files, by using a simple GUI to create scripts. Imagine that connecting your camera will launch MagicAction, which backups the images, scales them and creates a webpage with them. All this by just plugging a camera in. Of course you can add a confirmation requester if you like.
Applications supporting MagicBeacon -----------------------------------
This list will probaly grow in the future and I may not keep track on changes forever, but for now it is useful to have a little overview on which application support MagicBeacon.
OWB (V1.12): Notifications: TRANSFERDONE, TRANSFERFAILED, TRANSFERCANCELLED GRUNCH : UPDATEAVAILABLE TRANSFER : TRANSFERDONE GALLERIUS : OPERATIONDONE
Support -------
If you like this tool, feel free to drop a note or leave a donation on www.geit.de.
If you need help or if you have something to tell, feel free to mail or visit the IRC ( server: irc.freenode.net channel: #geit.de )
Bugs and Missing ----------------
- MagicAction support is not yet implemented. You find the option, but it's a dead end.
- You may notice some aditional options for rexx commands or tooltypes by scanning the code, but those features are planned and not yet implemented. You waste your time.
- FAT, NTFS, XGI, HFS, HFS+ and other MorphOS filesystem fail to handle the media change correct. This is a bug in those specific file systems an will be fixed with MorphOS 2.8. IceFS and SFS formatted media works perfect.
- RAM disk lacks of date/time changing notification. So be warned.
- This thingy is under heavy construction, so be prepared for more.
=======================================================================================
MagicBeacon für MorphOS -----------------------
Was zur Hölle ist MagicBeacon? ------------------------------
MagicBeacon ist Teil des MagicAction Pakets und wurde separat veröffentlicht. MagicBeacon ist ein hoch konfigurierbares Benachrichtigungssystem. Lassen sie mich zuerst ein paar Fragen stellen:
Wollten sie schon immer das sich das Bilderverzeichnis auf der Kamera öffnet, wenn sie die Kamera mit dem Rechner verbinden?
Haben sie sich schon mal gewünscht, dass ein DVD Film abgespielt wird, wenn man die DVD einlegt?
Wollten sie schon immer benachrichtigt werden, wenn EMails eingehen und sie auf einem anderen Bildschirm arbeiten?
Wollten sie schon mal das eine Datensicherung gestartet wird, wenn sie ihr Sicherungslaufwerk anschließen?
Das ist nur eine kleine Anzahl von Möglichkeiten MagicBeacon zu nutzen. Selbst ich kann mir nicht vorstellen, was noch alles möglich sein wird.
Ideen für zukünftige Erweiterungen sind willkommen.
Systemvoraussetzungen ---------------------
MorphOS 2.7 wird empfohlen. MorphOS 1.x Versionen werden nicht unterstützt.
Funktionen ----------
- Magic User Interface (MUI) mit all ihren Vorzügen. - Lokalisiert. - Erkennt einlegen und entfernen von Medien in bestimmte Laufwerke. - Erkennt Änderungen an Dateien und Verzeichnissen. - Erkennt spezifizierte Dateien und Ordner auf Medien - Ein internes und nach eigenen Wünschen zu konfigurierendes Titelzeilenmodul das verschiedene Darstellungsoptionen wie Laufschrift, Zentriert, Linksbündig oder entsprechende Auto-Modies, die bei zu großen Texten einen automatischen Wechsel zur Laufschrift ermöglichen. Diverse weitere Optionen erlauben das Anpassen nach wünschen der Nutzer. - Blasenanzeige mit voller Unterstützung der DisplayEngine und dem Alphakanal für die Umblendungen. - Ermöglicht das Ausführen multipler Aktionen bei nur einem Ereignis. - Eine Programmschnittstelle erlaubt Entwicklern und Anwendern eigene Ereignisse zu verschicken.
Installation ------------
Einfach mit einem Doppelklick starten und da ist es.
Einige vordefinierte Ereignisse sind bereits definiert. So könnte das Einlegen einer Kameraspeicherkarte bereits den Bilderordner öffnen. Das Einlegen eines Mediums in das Laufwerk cd0: wird im Titelzeilenticker dargestellt. Wenn es eine DVD war und MPlayer im Applications-Verzeichnis installiert ist, sollte der Film automatisch starten.
Sie wollen wahrscheinlich nicht bei jedem Start das Voreinstellungsfenster sehen. Das ist besonders sinnvoll, wenn sie MagicBeacon in the WBStartup ziehen und automatisch starten wollen. Dazu müssen sie lediglich den CX_PopUp Tooltype im Piktogramm aus FALSE setzen.
Die beiliegenden Katalogdateien können bei Bedarf einfach nach SYS:Locale/Catalogs kopiert werden.
Titelzeilenmodul (Screenbar) ----------------------------
Um die Konfiguration des Titelzeilenmoduls vorzunehmen benutzen sie die Standard MUI Voreinstellungen der Titelzeile. Sie befinden sich unter dem Tiefengadget des Bildschirms.
Das Titelzeilenmodul ist nur verfügbar, wenn eine Aktion in der Benachrichtigungsliste diese auch nutzt oder der SCREENBAR Tooltype im Piktogramm auf TRUE steht.
Textbox/Blasen --------------
Standardmäßig gibt es eine intern vordefinierte box. Es ist aber möglich beliebig viele Textboxen hinzuzufügen. Textbox-Hintergründe sind einfache 48x48 Bilder im ARGB format. Es kann also der Alphakanal für Transparenzen verwendet werden. Jede der Boxen wird in 9 Elemente von je 16x16 Pixeln geteilt:
123 456 789
Der Boxgenerator wiederholt die Elemente 2, 4, 6, 8 und 5 um die Box auf die benötigte Größe zu vergrößern, daher muß darauf geachtet werden, dass die Übergänge fließend sind. Eine so veränderte Box kann wie folgt aussehen:
:12223 122223 :45556 oder 455556 :78889 455556 : 788889
Wenn ein Hintergrund im 48x48 ARGB Format erstellt wurde, speichern sie das Bild und vergessen sie nicht den Alpha-Kanal mit den Transparenzen in das Bild einfügen zu lassen. Mit dem bekannten Tool "dt2raw", das im Aminet gefunden werden kann, lassen sich die Rohdaten aus der Bilddatei extrahieren und die resultierende Datei sollte 9216 Bytes lang sein. Diese Datei kopieren sie mit der Dateiendung ".rawbub" in das Verzeichnis "SYS:Prefs/Applications/MagicBeacon/Bubbles/" und nach einem Neustart steht der Hintergrund in der Oberfläche zur Auswahl.
Wenn sie einen schicken Hintergrund gebastelt haben, können sie ihn gerne einschicken.
Grundlagen ----------
Es gibt Ereignisse auf der einen Seite und Aktionen auf der anderen. MagicBeacon stellt nur die Verbindung her. Was welche Aktion auslößt entscheidet der Anwender.
Ereignisse sind neu eingelegte oder entfernte Medien. Änderungen an Dateien und Verzeichnissen, eingehende EMails oder RSS-Feeds und vieles mehr. Es gibt keine Grenzen und jeder Programmierer kann eigene Ereignisse für seine Programme erfinden.
Aktionen sind Programme, die gestartet oder benachtichtigt werden, aber auch z.B. ein Nachrichtenticker in der Bildschirmtitelzeile.
MagicBeacon wurde entwickelt um mit den Systemsignalen umzugehen, da diese für normale Anwender nicht zugänglich sind. Der Anwender kann die Anwendungsschnittstelle nutzen um eigene Ereignisse zu erzeugen. Ereignisse können via Shell, per ARexx oder über Programme, die bereits MagicBeacon unterstützen, benutzt werden.
Das Ziel von MagicBeacon ist, es so einfach wie möglich zu machen, Ereignisse mit den Aktionen zu verknüpfen. Es gibt nur eine Sache, die man wissen muß. Wer sendet was? Wenn eine Applikation MagicBeacon unterstützt, dann sollte sie in der Anleitung eine Liste alle Ereignisse beinhalten, die es kennt.
Entwickler sind angehalten die Ereignisse nach einem Namensstandard zu definieren. Dafür gilt Applikationsname.Ereignis, also z.B. "SUPERMAIL.NEWMAIL". Das Einhalten dieser Norm wird sowohl dem Anwender als auch dem Entwickler weitere Vorteile bringen.
Um aus ein solches Ereignis eine Aktion folgen zu lassen braucht der Anwender nichts anderes zu tun, als ein neues Ereignis zu erzeugen und "NEWMAIL" aus der Popup-Liste auszuwählen. Sollen nur Nachrichten über neue Mails von der Applikation "SUPERMAIL" empfangen werden, dann kann er den Eintrag auf "SUPERMAIL.NEWMAIL" ändern. Das ist schon alles.
ARexx -----
Einige rexx Skripte sind bereits verfügbar und im Arexx Verzeichnis. Wenn sie nützliche Skripte geschrieben haben, um mit anderen Programmen zu interagieren, dann könnten sie die gerne einsenden, damit ich die dem Archiv hinzufügen kann.
Rexx Kommandos --------------
Name: Ticker Template: MESSAGE/A,CENTER/S,LEFTALIGN/S,AUTOCENTER/S,AUTOLEFTALIGN/S, SCROLLING/S,DURATION/N,PRI/N Beschreibung: Zeigt die angegebene Nachricht in der Titelzeile an.
Name: Bubble Template: MESSAGE/A,FONT/K,SKIN/K,COLOR/K,X/N,Y/N,CENTER/S,MOUSE/S,DURATION/N" Beschreibung: Zeigt die angegebene Nachricht in einer Textbox an.
Name: SendBeacon Template: MESSAGE,NAME=CMD/K Beschreibung: Sendet eine Benachrichtigung an die Applikationsschnittstelle. Der Vorgabename des Signals ist "SENDBEACON"
Shell Kommandos ---------------
Einfacher als Rexx ist für den normalen Gebrauch oft die Kommandozeile. Derzeit bringt MagicBeacon die folgenden Kommandozeilen Programme mit:
Name: SendBeacon Template: MESSAGE,NAME=CMD/K Beschreibung: Sendet eine Benachrichtigung an die Applikationsschnittstelle. Der Vorgabename des Signals ist "SENDBEACON"
Beispiele: SendBeacon "Funktioniert". lößt alle Aktionen aus die auf die Applikationsschnittstelle konfiguriert sind und als Konfiguration "SENDBEACON" nutzen.
SendBeacon CMD "TICKER MESSAGE Hallo SCROLLING DURATION 20" Zeigt 20 Sekunden lang die Meldung "Hallo" an.
SendBeacon CMD "BUBBLE MESSAGE Hallo MOUSE DURATION 5" Zeigt 5 Sekunden lang die Meldung "Hallo" in einer Textbox an. Alle ARexx-Befehle können so auch von der Shell gesendet werden.
Voreinstellungen ----------------
Es ist sehr einfach eine neue Benachrichtigung hinzuzufügen. Einfach auf "Hinzufügen" drücken, einen Benachrichtigungstyp und dessen Konfiguration spezifizieren. Dann fehlt nur noch die Aktion, die von der Benachrichtigung ausgeführt werden soll.
Beachten sie die verschiedenen Hilfeblasen und sie erhalten viele Tipps zur Benutzung.
Es gibt einige Dinge zu beachten, daher erkläre ich die hier ebenfalls etwas ausführlicher.
Wenn sie einen Aktionstyp "weitere Aktion" einstellen, dann wird die Aktion zusammen mit dem Vorgänger ausgeführt. Das erlaubt das Ausführen einer unbegrenzten Anzahl von Aktionen bei nur einer eingehenden Benachrichtigung.
Für das Kommando und die Nachrichten können diverse Platzhalter verwendet werden, die einige Informationen über die Benachrichtigung enthalten und somit an die Programme weitergegeben und auch als Text dargestellt werden.
%p ist ein Pfad. Es ist der Laufwerksname in dem ein neues Medium eingelegt wurde zusammen mit dem Konfigurationstext als Pfad. Wenn also eine CD in "CD0:" gelegt wird und "images" als Konfiguration verwendet wurde, ist das Ergebnis "CD0:images"
%d ist das Laufwerk. Es ist einfach das Laufwerk, bei dem das Medium gewechselt wurde.
%D ist die Konfiguration selbst. z.B. "DCIM"
%m zeigt die Nachricht, die zu dem Ereignis gesendet wurde.
Nachtrag --------
Sie fragen sich bestimmt, warum es nicht weitere Aktionen gibt. Nunja, die Antwort ist einfach. Warum soll man etwas einbauen, dass im Betriebssystem schon eingebaut ist und damit Resourcen wie Zeit und Speicher verschwenden. Das wohl stärkste Programm für diesen Zweck ist das Kommando "open". Es unterstützt alle mime-Typen die in Ambient konfiguriert sind.
open www.geit.de -> startet den Standard Browser und öffnet die Webseite. open bing.iff -> Spielt den Ton ab open image.jpg -> Zeigt das Bild an
Wird open mit der %p Option benutzt öffnet sich ein Ambient Dateilister.
Für das Abspielen von Tönen empfielt sich das "play" Kommando, weil es keine eigenen Kontrollelemente in die Titelzeile einblendet.
"execute %p" kann zum Beispiel mit der "Mediendatei" Benachrichtigungsregel und einem Dateinamen wie z.B. "MorphOS.autorun" wird beim Einlegen eines USB Sticks und einer CD diese Datei ausgeführt.
Autostart beim Einlegen von Medien. War gar nicht so schwer, oder?
Ich habe noch einige zusätzliche Benachrichtigungstypen, die ich in zukünftigen Updates nachreichen werde.
MagicBeacon wurde entwickelt um MagicAction Skripte zu starten. MagicAction liefert ein mächtiges System um mit multiplen Dateien umzugehen. Der zu erstellende Arbeitsablauf wird mit einer einfachen GUI zusammen geschoben. Stellen sie sich vor, sie schließen ihre Kamera an den Rechner und MagicAction wird automatisch gestartet. Es sichert die Bilder, skaliert sie auf Wunschgröße und erzeugt eine Webseite mit ihnen. All das nur durch das Anschließen einer Kamera. Natürlich können sie eine Abfrage einfügen, wenn sie wollen.
Programme die MagicBeacon direkt unterstützen ---------------------------------------------
Diese Liste wird wahrscheinlich noch anwachsen und ich werde sie bestimmt nicht bis in alle Ewigkeit aktuell halten, aber derzeit ist das Angebot noch überschaubar und bringt schnelle Klarheit welches Programm wirklich MagicBeacon unterstützt:
OWB (V1.12): Ereignisse: TRANSFERDONE, TRANSFERFAILED, TRANSFERCANCELLED
Unterstützung -------------
Wenn sie dieses Programm mögen, dann teilen sie mir das mit oder hinterlassen eine Spende auf Geit.de.
Sollten sie Hilfe benötigen oder etwas zu sagen haben, dann schicken sie mir eine Mail oder einfacher besuchen sie mich und die Anwender im IRC ( Server: irc.freenode.net Kanal: #geit.de )
Bugs und Fehlbestand --------------------
- MagicAction Unterstützung ist nicht implementiert. Sie finden die Option, aber sie macht einfach nichts.
- Sie haben vielleicht zusätzliche Optionen für Rexx-Kommandos oder Tooltypes im Programmkode gesehen, aber diese Funktionen sind nicht implementiert. Verschwenden sie nicht ihre Zeit mit probieren.
- Das Einlegen von FAT, NTFS, XGI, HFS, HFS+ und weiterer MorphOS Dateisysteme wird nicht erkannt. Das ist ein Fehler in eben diesen Dateisystemen und wird mit MorphOS 2.8 behoben. IceFS und SFS Medien funktionieren einwandfrei.
- Die RAM-Disk unterstützt kein Datum/Uhrzeit Notifikation. Seien sie gewarnt.
- Dieses Programm wird noch stark bearbeitet. Seien sie bereit für mehr.
|