Not yet. This is related to another recent post about scripts not working with group bindings.
At the moment, scripts are like global functions, they can't be given a track or group scope and they won't use focus lock.
In the beginning that's all I needed because it's possible to achieve multi-track scripts using in statements like:
in 2 Record
in focused {...stuff...}
in myGroupName {...stuff...}
For scripts that operate on tracks with in you don't want those to obey binding scopes since the scoping is handled inside the script. But it's also very common to want a script that's just a function-with-benefits, and that should behave like any other function and obey binding scope.
We're going to need some keyword declarations like the old !focuslock to allow this. I'm not sure what the right combo is, it could be a single #scopable that implies all of track, group, focus scoping in the bindings. Or these could be split out with #focus meaning obeys focus lock and #scope meaning it obeys binding scope.
Binding scopes could also be implicit, if you bother to set up a script binding that has a track or group, then that always means to use that and it's up to the script author to avoid the use of in within those scripts. I suppose we could get fancy and provide something that could be tested by the script to see how it is being called...
if bindingScope is empty {
// no scope specified, go to town with in
}
else {
// scope specified, limit what is done to the single target track
}