Opened 12 years ago

Last modified 11 years ago

#11363 new enhancement

Execute custom handlers when events trigger AppleScripts

Reported by: iNik Owned by: applmak
Milestone: Component: AppleScript
Version: Severity: normal
Keywords: event script applescript message Cc:
Patch Status:


It would be useful to inform AppleScripts attached to events of the context of the event, so that the script could, for example, only affect the chat that triggered the event.

This could be implemented just like the current subtitute() handler used by script plug-ins, but instead just pass the current message ID, contact ID, account ID, etc., depending on context.

So a script could then have a "signon()" handler, a "message()" handler, etc.

Alternately, Adium could pass variables directly to the script (e.g. {class:"message",id:"14331"})

This is in some ways a repeat of, which was not fully addressed by the AppleScript improvements in 1.2.

Change History (1)

comment:1 Changed 11 years ago by Joel

+1. This is an extension of #2864 which was falsely closed.

I think this is a very important request. Currently allowing events to run applescripts without the ability to pass arguments is quite constraining.

It also would allow the implementation by third parties of some of the requests related to #7923, e.g. in the comments there where one user wants to make event notifications account-specific so that they are only notified of work-related communications. I similarly want account-specific options because Facebook's online notifications are too frequent and should be disabled, but I appreciate growl notifications for other services. For this I need all data that would be sent to growl, plus the originating service.

Note: See TracTickets for help on using tickets.