I have no previous experience of programing in JavaScript or any other programing language except some shell scripting before getting my Pronto. The downside with learning something by yourself at home is that there is no one to ask for advice. So the reason for publishing it here is foremost to get constructive criticism on my coding. But if anyone find it good enough to use, feel free to do so. If it ever get the Ok-stamp from the board members I will post it in the Files section of this site.
The EventGhost ProntoScript Library is a bare bones version of the modules I am using at home. It is supposed to be really simple and do only one thing. That is to send events to EventGhost via its Network Event Receiver Plugin. It therefore expose only one public function named "event". The only "required" parameter is the name of the event to be sent. Optional parameters are IP Adress, IP Port and Password for EventGhost. This can be useful for example if your HTPC is turned of and you want to send a Wake-On-Lan command to it via another EventGhost PC. The communication error handling is really simple, it just displays a GUI.alert with the reason when the timeout value is reached.
/Fredrik
Download link:
[Link: algonet.se]Requirements:
--------------------
EventGhost ProntoScript Library is only tested with PEP 2.4.18 and Firmware 7.2.22.
EventGhost automation software with the Network Event Receiver Plugin loaded.
Philips TCP Library (com.philips.InteractiveTCPClient.js). Make sure that you have it attached and enabled either sytem-wide or at your activity.
EventGhost ProntoScript Library expects to find a parameter page in each activity in wich it is invoked. The parameter page has three different labels containing respectively the IP Adress, IP Port and Password of
EvenGhost.
Parameter Page:
--------------------
EventGhost Parameter page ProntoScript Name: EG_PARAMETERS
EventGhost IP Adress label ProntoScript Name: IP
EventGhost IP Port label ProntoScript Name: PORT
EventGhost Password label ProntoScript Name: PASSWORD
Sample Usage:
--------------------
Activity Script:
--------------------
var eg = local.fdaa.EventGhost;
Page or Button Script:
--------------------
eg.event("Name Of Event");
or
eg.event("Name Of Event", "EventGhost IP", "EventGhost port", "EventGhost Password");