Need Variable name

ChrisFontenot13 wrote on 11/9/2004, 10:03 AM
OK, I've been using Vegas for a while at work, though not nearly to its full capability. I have a little programming experience, but I'm new to JavaScript. I need to know the variable name that will return the currently open media file in the media pool (there will only be one). This will be used to name a jpeg screenshot using a script based on the ThumbnailAtMarkers script. An example would be: the open file is "samplevideo1.mpg" - I want it to name all six or seven pictures I will be taking "samplevideo1picture1.jpg." I will possible be building functionality into it later to render the filename as something like "samplevideo1editedcopy.mpg" but that comes later.

I've gotten everything else re-coded to what I need.

Thanks in advance!

Comments

jetdv wrote on 11/9/2004, 11:50 AM
First of all, you would have to be VERY careful to ensure there was only one item in the media pool. However, if there is, just enumerate the media pool items.

Instead, why not just look at the timeline event, get the take, and then you can pull out the complete file name (including path). If VEvnt is the track event on the timeline,

VTake = VEvnt.ActiveTake;
VPath = VTake.MediaPath;
ChrisFontenot13 wrote on 11/9/2004, 12:13 PM
Thanks for the quick response.

We only ever have 1 Mpeg open at a time, this is a very simple operation.

I can't seem to get these to work; are they set up for 5? I'm using 4.0e.
jetdv wrote on 11/9/2004, 12:24 PM
The two lines of code I entered work in 4 and 5. They are in reference to a TRACK EVENT instead of an item in the Media Pool.

Try this for accessing the info from the media pool.
ChrisFontenot13 wrote on 11/9/2004, 2:59 PM
Ok, I tried it the way I was thinking of it and it didn't work out quite that way, but I used your second method and it works fine.
I used substr to strip off the ".mpg" extension which was kinda clunky but they're always the same length.

Thanks a lot!
jetdv wrote on 11/9/2004, 6:32 PM
Glad to hear you got it working.
ChrisFontenot13 wrote on 11/10/2004, 10:39 AM
Ack! The jpgs are larger than I need them. I need to reset the size to 327X240x24. Which variables control this?
jetdv wrote on 11/10/2004, 10:56 AM
You will have to adjust the Pan/Crop settings to do this. Have you looked at the scripting API? Have you looked at my newsletters?
ChrisFontenot13 wrote on 11/10/2004, 11:22 AM
Ah! Thanks! I have a copy of the API, but I'm lost in Java; luckily this problem had nothing to do with the script but with settings from when another person was using my machine. I appreciate the links.