Mail.Colour = 0xffff0000;
Where the hex value is in the form "0xAARRGGBB", alpha, red, green, blue. Fairly standard stuff. The first part calls back into the filter object via the DOM mapping to test the conditions defined in the Conditions tab of the filter. This way you can customize the conditions even furthur or ignore the conditions entirely and just make up your own scripted conditions. But at least if you want to use the UI for conditions you can. You get 3 predefined variables, App = the application DOM object, Mail = the mail object being filtered and Filter = the filter object the script is attached to. Of course all that will be documented in time.
I'm also thinking of having a application wide set of scripted event handlers so that you can hook events and execute scripts. This would allow you to customize various things like changing default settings on new mail or do something when the app starts. I really don't know what people will want to do yet but I'll just get it out there and see what people start hacking on to Scribe. I'm sure there will be a deluge of questions and scripts flying around for a while.
Better get a release out eh!
After fixing a bunch of bugs in the script engine this now works:
Fd = GetFolder("/Inbox");
Print("Got folder '" + Fd.Name + "'\n");
Child = CreateSubFolder(Fd, "Test", "Mail");
It creates (or uses an existing) folder called 'Test' under the inbox and moves a matching email to that folder. You could for instance pull information out of the contact record associated with the sender to sort email into folders based on sender, creating more sub-folders if needed with this sort of script.
The "Print" command outputs to a new scripting console window that is hidden by default but you can show it using Tools -> Debug -> Show Scripting Console.
What would you want to do with scripted filters?