Sorry for disturbing you again. I got a little problem. Im trying to use your script on a different project. Its pretty much the same, only difference is that layers are numbered different. So i did what you said and modified the lines like this:
boxes.Add((VideoEvent)vegas.Project.Tracks[7].Events[0]);
boxes.Add((VideoEvent)vegas.Project.Tracks[8.Events[0]);
boxes.Add((VideoEvent)vegas.Project.Tracks[9].Events[0]);
boxes.Add((VideoEvent)vegas.Project.Tracks[10].Events[0]);
since the tracks that now contain the frames are 8 through 11. Is this correct? However, when i execute the script no frame is added. Is there anything else i need to modify?
Thank you again.