It's not currently supported. All supported features are documented in the scripting reference, and if it's not there, you need to use the event system instead.
These do sound like they would be useful in scripting though, so I'll look in to adding them for a future release.