I'm trying to write an alias that creates a colour trigger, but I seem to be utterly hopeless at it.
Could anyone suggest how to go about this?
It's for adding pk highlights (cos I'm lazy), so ideally all I'd have to type is "addthief <name>" and it would create a trigger on that name. I've tried mucking about with AddTrigger, but I can't even get that working on its own. =)
You would have to do it a bit differently. You cannot directly do it, so you would need to give the trigger a label, and then change the group using SetTriggerOption. The most reliable way would be this, although you end up with triggers with long labels...
The problem is that COM objects are supposed to have well-defined argument lists, that don't change once published. Also, they don't have optional arguments, AFAIK.
Now that I have the routines SetTriggerOption (and ImportXML) I don't plan to keep upgrading the original AddTrigger (and AddTriggerEx) with yet another version, which will itself be out-of-date when yet another trigger option is added.