[MlMt] MailMate event scripts

Benny Kjær Nielsen mailinglist at freron.com
Fri May 13 10:27:10 UTC 2011


On 13 May 2011, at 11:15, Helge Andre Gudmundsen wrote:

> I am trying to get a simple script to run when new mail arrives, but 
> my script does not seem to trigger. [...]

I tried your script and it works for me (with a different sound). Note 
that the 'script' key does not work for this kind of event and the UUID 
should not be used when not overwriting any default scripts (of which 
none are currently enabled). A rewritten version is here:

{
	name    = 'New Mail';
	events  = ( 'account.synchronized' );
	select  = "$Inbox.filter(#flags.flag !=[x] '\\Seen')";
	actions = ( { type = playSound; path = 'CashRegister.wav'; } );
}

The simple 'path' above makes MailMate look in '~/Library/Sounds', but 
it should also work with a full path.

> Are there any debug settings in MailMate that I can use to check 
> whether the script triggers or not?

No, but I can see that there really should be.

Is your script located in:

	~/Library/Application Support/MailMate/Scripts/SomeName.mmCommand

If MailMate fails to find the sound then an error is logged (look in 
Console.app).

I'll work on introducing a debug variable for scripts, so let me know if 
you still cannot make the script work. In general, scripts are still 
experimental, but playing sounds and moving messages should work since I 
use such scripts myself.

(Sounds, by the way, can be configured in the Preferences, but I guess 
you are just playing with scripts.)

-- 
Benny


More information about the mailmate mailing list