register application with image using AppleScript

The Growl forums have moved to Google Groups, this forum is read only.
Chris Cairns
Harmless
Posts: 21
Joined: Tue Oct 14, 2008 6:07 pm

register application with image using AppleScript

Postby Chris Cairns » Tue Aug 04, 2009 2:54 pm

I want to know how to use register a growl application with an icon of an image file.
I know about:

Code: Select all

on theGrowl(thenotifier)
   set TheFile to "file:///Users/1/Desktop/sharelogo.gif"
   tell application "GrowlHelperApp"
      set the allNotificationsList to {"share Notifier"}
      
      set the enabledNotificationsList to {"share Notifier"}
      
      register as application "share Notifier" all notifications allNotificationsList default notifications enabledNotificationsList
      notify with name "share Notifier" title "share Notifier" description thenotifier application name "share Notifier" image from location TheFile
   end tell
end theGrowl


But I want to know if there is a better way instead of having to specify the location of the file in each script.

User avatar
boredzo
Cocoaforge Admin
Posts: 796
Joined: Mon Dec 06, 2004 7:49 am
Contact:

Re: register application with image using AppleScript

Postby boredzo » Tue Aug 04, 2009 4:33 pm

O hai I fixed your title.

Chris Cairns wrote:But I want to know if there is a better way instead of having to specify the location of the file in each script.


If your script is an application, yes. Use the “icon of application” parameter to the register command.

Chris Cairns
Harmless
Posts: 21
Joined: Tue Oct 14, 2008 6:07 pm

Re: register application with image using AppleScript

Postby Chris Cairns » Tue Aug 04, 2009 4:45 pm

If your script is an application, yes. Use the “icon of application” parameter to the register command.

That is the point, I am trying to make. If i want a youtube icon, i have to create a text file and save it as an app first and give the app a youtube icon. Is there no other way?

User avatar
boredzo
Cocoaforge Admin
Posts: 796
Joined: Mon Dec 06, 2004 7:49 am
Contact:

Re: register application with image using AppleScript

Postby boredzo » Tue Aug 04, 2009 5:27 pm

Chris Cairns wrote:If i want a youtube icon, i have to create a text file and save it as an app [or other file] first and give the app [or other file] a youtube icon. Is there no other way?


If there were, it would be listed in the dictionary.

Note that your script itself can be an application.

Chris Cairns
Harmless
Posts: 21
Joined: Tue Oct 14, 2008 6:07 pm

Re: register application with image using AppleScript

Postby Chris Cairns » Tue Aug 04, 2009 5:42 pm

If there were, it would be listed in the dictionary.

I am not good at reading the dictionary. I merely observe scripts and edit them to meet my needs.

Note that your script itself can be an application.

Its the same thing. An application has to be created when one does not want to.


Return to “Growl”

Who is online

Users browsing this forum: No registered users