I Need SnapShot Script Help, Vegas 10 Pro at DVinfo.net
DV Info Net

Go Back   DV Info Net > Windows / PC Post Production Solutions > What Happens in Vegas...
Register FAQ Today's Posts Buyer's Guides

What Happens in Vegas...
...stays in Vegas! This PC-based editing app is a safe bet with these tips.

Reply
 
Thread Tools Search this Thread
Old April 8th, 2011, 09:37 PM   #1
Regular Crew
 
Join Date: Sep 2010
Location: Cartersville GA
Posts: 132
I Need SnapShot Script Help, Vegas 10 Pro

I really hope I am not being a pain. Snap Shots in my work is a major Must Have and will be a large part of my work flow.
I ran a search and did the Google thing.
I have been having problems like, Links not working anymore, forum registration problems, and the ones I did find fail.
I did get some info in a JetDV news letter but it is unclear how to apply it. The documet mostly talks about it.

So........... :-° Any help would be great. I am willing to pay for a working script. Something that would put things back to normal after the shot is taken. I just cannot get my hands on one.

I tried the below in two ways. One saved as a .cs and got the error message.........

System.ApplicationException: Script file does not exist: 'C:\Program Files\Sony\Vegas Pro 10.0\Script Menu\SnapshotToClipboard.js'.
at Sony.Vegas.ScriptHost.LoadScriptText()
at Sony.Vegas.ScriptHost.RunScript(Boolean fCompileOnly)

And the same file saved as a .js and got the following........

C:\Program Files\Sony\Vegas Pro 10.0\Script Menu\SnapshotToClipboard.js(17) : Variable 'VideoRenderQuality' has not been declared
C:\Program Files\Sony\Vegas Pro 10.0\Script Menu\SnapshotToClipboard.js(21) : Variable 'VideoFieldOrder' has not been declared
C:\Program Files\Sony\Vegas Pro 10.0\Script Menu\SnapshotToClipboard.js(22) : Variable 'VideoDeinterlaceMethod' has not been declared
C:\Program Files\Sony\Vegas Pro 10.0\Script Menu\SnapshotToClipboard.js(25) : Variable 'RenderStatus' has not been declared

===== The Script Text Below =====

// This script copies a snapshot of the current cursor position to the clipboard

import System.Windows.Forms;
import SonicFoundry.Vegas.Script;
import SonicFoundry.Vegas;

// Save original Settings
var origPreviewRenderQuality = Vegas.Project.Preview.RenderQuality;
var origPreviewFillSize = Vegas.Project.Preview.FullSize;
var origFieldOrder = Vegas.Project.Video.FieldOrder;
var origProjectDeinterlaceMethod = Vegas.Project.Video.DeinterlaceMethod;

try
{

// Setup Preview for image capture
Vegas.Project.Preview.RenderQuality = VideoRenderQuality.Best;
Vegas.Project.Preview.FullSize = true;

// Set the field order and deinterlace method
Vegas.Project.Video.FieldOrder = VideoFieldOrder.ProgressiveScan;
Vegas.Project.Video.DeinterlaceMethod = VideoDeinterlaceMethod.InterpolateFields;

// Copy Snapshot to Clipboard
Vegas.SaveSnapshot() == RenderStatus.Complete

}
catch (e)
{
MessageBox.Show(e);
}

// Restore Previous Settings
Vegas.Project.Preview.RenderQuality = origPreviewRenderQuality;
Vegas.Project.Preview.FullSize = origPreviewFillSize;
Vegas.Project.Video.FieldOrder = origFieldOrder;
Vegas.Project.Video.DeinterlaceMethod = origProjectDeinterlaceMethod;


// This script copies a snapshot of the current cursor position to the clipboard

import System.Windows.Forms;
import SonicFoundry.Vegas.Script;
import SonicFoundry.Vegas;

// Save original Settings
var origPreviewRenderQuality = Vegas.Project.Preview.RenderQuality;
var origPreviewFillSize = Vegas.Project.Preview.FullSize;
var origFieldOrder = Vegas.Project.Video.FieldOrder;
var origProjectDeinterlaceMethod = Vegas.Project.Video.DeinterlaceMethod;

try
{

// Setup Preview for image capture
Vegas.Project.Preview.RenderQuality = VideoRenderQuality.Best;
Vegas.Project.Preview.FullSize = true;

// Set the field order and deinterlace method
Vegas.Project.Video.FieldOrder = VideoFieldOrder.ProgressiveScan;
Vegas.Project.Video.DeinterlaceMethod = VideoDeinterlaceMethod.InterpolateFields;

// Copy Snapshot to Clipboard
Vegas.SaveSnapshot() == RenderStatus.Complete

}
catch (e)
{
MessageBox.Show(e);
}

// Restore Previous Settings
Vegas.Project.Preview.RenderQuality = origPreviewRenderQuality;
Vegas.Project.Preview.FullSize = origPreviewFillSize;
Vegas.Project.Video.FieldOrder = origFieldOrder;
Vegas.Project.Video.DeinterlaceMethod = origProjectDeinterlaceMethod;
__________________
GAPI
Allen Campbell is offline   Reply With Quote
Old April 8th, 2011, 09:49 PM   #2
Trustee
 
Join Date: Mar 2004
Location: upper hunter, australia
Posts: 1,410
Re: I Need SnapShot Script Help, Vegas 10 Pro

version? system?

if you're having other problems to, then i think you'd best start off looking for problems elsewhere - virus, malware, etc.,
__________________
www.lesliewand.com.au
Leslie Wand is offline   Reply With Quote
Old April 8th, 2011, 10:55 PM   #3
Regular Crew
 
Join Date: Sep 2010
Location: Cartersville GA
Posts: 132
Re: I Need SnapShot Script Help, Vegas 10 Pro

Vegas Pro 10c Build 470.
The problems are else where, not with my system but in locating scripts. Many of the links I have searched out are dead. I tried to join a forum and having technical difficulties and the administrators are slow getting back to me. Some scripts like the one I posted are for older versions.

System? Home built by yours truly and heavily maintained, protected and pampered.

Windows 7 Pro x64
Gigabyte Mobo GA-EP45-UD3P
Intel Q6600 CPU - Stock Clock
8GB DDR2 CORSAIR XMS2 DHX - Voltage @ 2.1 (Mfg Recommended)
620W CORSAIR PSU CMPSU-620HX Modular
POWERCOLOR AX3650 512MD2 Radeon HD
WD 750GB RE3 x2 in RAID-1 System OS Drives
WD Black 1TB Media Source Location
WD Blue 1TB Media Rendered Destination
WD Green 750GB Storage
WD RE2 750GB x 2 in RAID 1 External eSATA Box Backups
WD MyBook 500GB USB Misc Storage
Dual Samsung 215TW S-PVA Displays, Pantone EyeOne Display2 Calibrated.

Thanks
__________________
GAPI
Allen Campbell is offline   Reply With Quote
Old April 9th, 2011, 01:26 AM   #4
Trustee
 
Join Date: Mar 2004
Location: upper hunter, australia
Posts: 1,410
Re: I Need SnapShot Script Help, Vegas 10 Pro

obviously you know what you're running ;-)

so if you're using 10c, what happens when you use the snapshot button?
__________________
www.lesliewand.com.au
Leslie Wand is offline   Reply With Quote
Old April 9th, 2011, 05:31 AM   #5
Inner Circle
 
Join Date: May 2005
Location: Windsor, ON Canada
Posts: 2,770
Re: I Need SnapShot Script Help, Vegas 10 Pro

In Pro 9, Sony added the following features.

* Copy Snapshot to Clipboard and Save Snapshot to File now deinterlace interlaced images and operate at Best (Full) resolution if the Video Preview is set to (Auto) size and Good quality if set to Draft or Preview.
* Copy Snapshot to Clipboard now performs pixel-aspect correction like the Save Snapshot to File command.
* Added Copy Snapshot to Clipboard and Save Snapshot to File to the Trimmer.

A roundabout way of saying don't worry about having to change anything.
Mike Kujbida is offline   Reply With Quote
Old April 9th, 2011, 01:47 PM   #6
Sponsor: JET DV
 
Join Date: Dec 2001
Location: Southern Illinois
Posts: 7,953
Re: I Need SnapShot Script Help, Vegas 10 Pro

The script you're using is a ".js" script. If you seem "import" - it's a js.

Here's my version for Vegas Pro 8:

Code:
/*******************************************
 * This script will save a snapshot from the timeline
 *
 * Written By: Edward Troxel - partially modified from the script by Joe Satcher
 * www.jetdv.com
 *******************************************/

import System;
import System.IO;
import System.Windows.Forms;
import Sony.Vegas;

// Where should the file be saved?
var destdir = "C:\\";

// What is the file name?
var destname = "MyPic";


// Save the current settings
var origPreviewRenderQuality = Vegas.Project.Preview.RenderQuality; 
var origPreviewFillSize = Vegas.Project.Preview.FullSize; 
var origFieldOrder = Vegas.Project.Video.FieldOrder; 
var origProjectDeinterlaceMethod = Vegas.Project.Video.DeinterlaceMethod; 
var currentTime = Vegas.Cursor; 


try { 
  var imageFileName = destdir + destname + ".png";


  // Set for the best quality. 
  Vegas.Project.Preview.RenderQuality = VideoRenderQuality.Best; 
  Vegas.Project.Preview.FullSize = true; 
  Vegas.Project.Video.FieldOrder = VideoFieldOrder.ProgressiveScan; 
  Vegas.Project.Video.DeinterlaceMethod = VideoDeinterlaceMethod.InterpolateFields; 

Vegas.UpdateUI();

  // Show the script's dialog box. 
  var dialog = new SaveFileDialog(); 
  dialog.Filter = "PNG File (*.png)|*.png|JPEG File (*.jpg)|*.jpg"; 
  dialog.CheckPathExists = true; 
  dialog.AddExtension = true; 
  if (Directory.Exists(destdir)) { 
    dialog.InitialDirectory = destdir; 
  } 
  dialog.DefaultExt = Path.GetExtension(imageFileName); 
  dialog.FileName = Path.GetFileNameWithoutExtension(imageFileName); 

  // if the OK button was pressed... 
  if (dialog.ShowDialog() == DialogResult.OK) { 
  // Get the basis for output image file names 
    imageFileName = Path.GetFullPath(dialog.FileName); 

    // Get the output image file name extension
    var imageFileNameExt = Path.GetExtension(imageFileName); 
    var imageFormat = ImageFileFormat.PNG; 
    if (0 == String.Compare(imageFileNameExt, ".jpg", true)) { 
      imageFormat = ImageFileFormat.JPEG; 
    }

    // save a snapshot. 
    if (Vegas.SaveSnapshot(imageFileName, imageFormat, Vegas.Cursor) == RenderStatus.Complete) { 
      Vegas.UpdateUI(); 
    } 
  } 
} catch (e) { 
  MessageBox.Show(e); 
} 

// restore the project and preview settings 
Vegas.Project.Preview.RenderQuality = origPreviewRenderQuality; 
Vegas.Project.Preview.FullSize = origPreviewFillSize; 
Vegas.Project.Video.FieldOrder = origFieldOrder; 
Vegas.Project.Video.DeinterlaceMethod = origProjectDeinterlaceMethod;
Edward Troxel is offline   Reply With Quote
Old April 9th, 2011, 02:19 PM   #7
Regular Crew
 
Join Date: Sep 2010
Location: Cartersville GA
Posts: 132
Re: I Need SnapShot Script Help, Vegas 10 Pro

Thanks Ed, You said js twice. Just to confirm, its a .js yes?

Also, you get my PMe?

Thanks
__________________
GAPI
Allen Campbell is offline   Reply With Quote
Old April 9th, 2011, 02:21 PM   #8
Sponsor: JET DV
 
Join Date: Dec 2001
Location: Southern Illinois
Posts: 7,953
Re: I Need SnapShot Script Help, Vegas 10 Pro

Yes, .JS (as this one says "import". If you see the word "using" instead, it's a .CS.

And yes I did, and responded to it.
Edward Troxel is offline   Reply
Reply

DV Info Net refers all where-to-buy and where-to-rent questions exclusively to these trusted full line dealers and rental houses...

B&H Photo Video
(866) 521-7381
New York, NY USA

Scan Computers Int. Ltd.
+44 0871-472-4747
Bolton, Lancashire UK


DV Info Net also encourages you to support local businesses and buy from an authorized dealer in your neighborhood.
  You are here: DV Info Net > Windows / PC Post Production Solutions > What Happens in Vegas...


 



All times are GMT -6. The time now is 01:39 AM.


DV Info Net -- Real Names, Real People, Real Info!
1998-2024 The Digital Video Information Network