Question re scripting capabilities

A. Grandt wrote on 6/17/2009, 1:58 AM
Is it possible via scripting to look into an imported .veg file on the time line, and copy tracks/events out of it?
For instance find all 'muted' tracks in the .veg, and copy them to new tracks on the time line, and unmute them?

And I'm a complete beginner to Vegas scripting, so much so that I haven't even done the proverbial "Hello World!" yet, so this is not so much a "How" question, as it is a "is it even possible" one. The "How" could be interesting to see though :)

Best Regards
A.Grandt

Comments

jetdv wrote on 6/17/2009, 6:08 AM
With the project open, a script could go through the timeline, located muted events, and move them to a separate/new track.
JohnnyRoy wrote on 6/17/2009, 12:10 PM
I believe the answer is No (at least not easily) if I understand your request correctly. You want to look into a nested project on the timeline and copy something out of it into the current project. You cannot do this with scripting because you cannot do this with Vegas. Script simply automates what can already be done in Vegas. Since you cannot look into a nested veg file without opening it up in another instance of Vegas (that the script is not running in) and since there is noway to get the events from one project to the other other than some elaborate clipboard manipulation and semaphores (which is why I said, "not easily"), no... there is no easy way to do this.

The "not easily" way would be to use two scripts. The first would call a new instance of Vegas passing the veg file and second script name. The second script would find what you are looking for and place the events on the clipboard. It would then need a way to signal the first script that the data is ready (via a semaphore of some kind) and wait while the first scripts copies the events from the clipboard and places them on a new track. The first script would then have to signal the second script via semaphore that it is done so that the second script can close it's instance of Vegas and return. This assumes that you could place an event on the clipboard via scripting and successfully retrieve it. I have never tried this so it may not even work.

Did I mention the answer was probably No? ;-)

~jr
A. Grandt wrote on 6/17/2009, 12:52 PM
Did I mention the answer was probably No? ;-)

I think you did :)

Sadly, because the application of this could have been rather interesting.

Thanks


Best Regards
A.Grandt