Send Growl notifications from your ColdFusion App

Ok, so i realised there are many coldFusion developers on macs now and if you are like us then you love getting notifications of everything via Growl!

So we thought how cool would it be to be able to send growl notifications from any CF app, like sending the mac-using CEO a growl notification each hour with a sales summary, etc...

We also noticed there were a few implementations already (in ruby, php, python, java) but none in our favourite language (and the java implementation was bloated with a growl listener client included... where as we want a fast coldFusion native easily modifiable sending solution only + you don't need to do no funky installations)

Ok, so after a long night, using the other examples as reference, i've got a working alpha prototype that allows you to setup as easily as:

application.objGrowl = createObject('component','growl').init(appName='cfGrowl:My App');

then add some available notification types:

application.objGrowl.addNotification(notification='Company Sales',enabled=true);
application.objGrowl.addNotification(notification='Site Error',enabled=true);

then add client hosts to receive the notifications:

application.objGrowl.addHost(host='192.168.0.1',password='1s2v3');
application.objGrowl.addHost(host='192.168.0.2',password='1@23$45');

then broadcast a new notification:

application.objGrowl.sendNotification(
   notificationType='Company Sales',
   title='Website Store Hourly Sales Report',
   message='5 orders, 10 products, $3000 revenue',
   priority = 0,
   sticky = false);

so the code is attached, and we've only tried it currently with static IPs in an intranet environment, so it may need tweaking to work with firewalls, not entirely sure about that, or you could target with port forwarding a single mac machine that using growl network options can relay broadcast to all local machines... something to look at in future anyway.

you need to make sure you've got "listen for incoming notifications" and "allow remote application registration" checked in the network options tab in system preferences, and enter a server password, that you then enter when you add your IP and password as a new host.

also i read that snarl client for PC plans on being able to consume growl notifications in near future so this could soon be an even cooler cross platform solution

i'll make a riaforge project out of this if people show interest to further develop features (like writing hosts out to an XML file so they aren't lost on application restart), otherwise just our office will have the coolest coldfusion app notifications in the world ;)

FireFox 2 and Solution for Broken ColorZilla

I was using colorzilla extensively until I upgraded to firefox 2 and all of a sudden i found myself without it and taking screenshots and pasting into fireworks all day.. then copying the hex code into eclipse. It was a very messy process which was made worse by the fact the fireworks isn't exactly the slickest app on an intel mac.

However I found this very interesting article Easy color Picking for Mac and by putting this script into my /library/scripts and turning on the script menu via /applications/applescript/AppleScript Utility I am now able to use a color picker in any application which has streamlined the entire process.

Seriously I am actually going to make a cf post soon...