Not sure I understand your issue very well, but you could perhaps use the sustain Scriptlet given here: