Page 1 of 1

i tried to use growl via appscript but not working

Posted: Sat Apr 07, 2007 1:43 pm
by osamu
I tried to use appscript to growl something, not working , no error message loged. (Appscript's the applescript binding of python, u can use python instead of applescript.)

I guess the problem's with growl, since i've done something with appscript to control illustrator and photoshop. It worked fine.

Code: Select all

from appscript import *
growl=app('GrowlHelperApp')
growl.notify(with_name='not working',title='some title',description='for some reason',application_name='daddy')

Posted: Sat Apr 07, 2007 7:36 pm
by Diggory
You need to register before sending any notifications.

http://growl.info/documentation/applescript-support.php

Posted: Sun Apr 08, 2007 2:24 am
by osamu
ok, i used register,it worked, but notify still not working :o

Code: Select all

from appscript import *

growl=app('GrowlHelperApp')
allNotificationsList=["Test Notification", "Another Test Notification"]
enabledNotificationsList=["Test Notification"]
growl.register(as_application="PyGrowl",all_notifications=allNotificationsList,default_notifications=enabledNotificationsList,icon_of_application="Script Editor")
growl.notify(with_name='Test Notification',title='Notification1',description='Time for supper!',application_name='mommy')
growl.notify(with_name='Another Test Notification',title='Notification2',description='Time for work!',application_name='daddy')

Posted: Sun Apr 08, 2007 2:29 am
by bgannin
Shouldn't your application name not be "mommy" or "daddy" but instead "PyGrowl", as that's what you've registered?

Posted: Sun Apr 08, 2007 2:35 am
by osamu
lol, nicely worked, thx