My client needs an application written for Mac OS X (Must run on OS X 10.5 and OS X 10.6) that will run in the background and read iCal's current alarms and their associated appointment colours. It will then write to a file which it will continously update at regular intervals as it polls iCal. The interval needs to be user defined in seconds from 1 to 99. The values in the file need to be Hexadecimal values in the format RRGGBB.
For example: White = 000000, Black = FFFFFF
If there is more than one current iCal alarm active, it will write all of them underneath each other with CR+LF (carriage returns and line feeds) to separate them. The order is not important. So if iCal has three reminder alarms currently on, the file will look as follows (ignore the comments in brackets):
00FF00 (for a green calendar appointment alarm)
FF0000 (for a red calendar appointment alarm)
00FFFF (for a cyan calendar appointment alarm)
When an alarm has been dismissed in iCal, it will disappear from the file on it's next update.
When there are no appointments, the file will exist, but all it will contain is a CR+LF and EOF marker.
The source code of this application or script needs to be made available in case of further development.
This file will be read by another application which will be then used to send triggers to a simple lighting controller. The details of this will be available in a separate project which is phase 2.