Comments

JohnnyRoy wrote on 10/16/2010, 9:08 PM
I wrote my own some time ago. You are welcome to it. Just change the path to your graphics application:

//*******************************************************************
//* Program: OpenInGraphicEditor.cs
//* Author: John Rofrano
//* Updated: December 27, 2009
//* Copyright: (c) 2009, John Rofrano, All Rights Reserved
//********************************************************************
using System;
using System.Diagnostics;
using System.Windows.Forms;
using Sony.Vegas;

public class EntryPoint
{
String graphicsProgram = @"C:\Program Files (x86)\Adobe\Adobe Photoshop CS5\Photoshop.exe";

public void FromVegas(Vegas vegas)
{
try
{
VideoEvent videoEvent = FindFirstSelectedVideoEvent(vegas.Project);
if (videoEvent != null && videoEvent.ActiveTake != null)
{
Process.Start(graphicsProgram, "\"" + videoEvent.ActiveTake.MediaPath + "\"");
}
else
{
MessageBox.Show("You must select a video event before running this script", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
catch (Exception e)
{
MessageBox.Show(e.Message, "Critical Error", MessageBoxButtons.OK, MessageBoxIcon.Stop);
}
}

/// <summary>
/// Returns the first selected video event
/// </summary>
/// <param name="project"></param>
/// <returns>The first selected video event or null if no video event selected</returns>
public VideoEvent FindFirstSelectedVideoEvent(Project project)
{
foreach (Track track in project.Tracks)
{
// only check video tracks
if (!track.IsVideo()) continue;

foreach (VideoEvent videoEvent in track.Events)
{
if (videoEvent.Selected)
{
return videoEvent;
}
}
}

return null;
}
}


~jr
UlfLaursen wrote on 10/16/2010, 9:25 PM
Very nice, JR - thanks. Don't know if possible, but perhaps you could put it inti Ultimate S too?

/Ulf
ushere wrote on 8/8/2011, 8:18 PM
hi jr,

are you sure this is working in 10e / 64?

i keep getting an exception, as listed in the newer thread....

thanks
im.away wrote on 8/9/2011, 5:47 AM
Whizzbang! Thank you, JR, for this excellent little script. It is something I've needed for a while now. Works perfectly on 10e under win7 64 bit.

Cheers

Russ
Rosebud wrote on 8/9/2011, 12:14 PM
You can find my scripts here:
http://sony.vegas.1.free.fr/
JJKizak wrote on 8/9/2011, 12:46 PM
Mine started working when I set Vegas to open as administrator.
JJK
dxdy wrote on 8/9/2011, 2:33 PM
Works fine in 10.0d and 10.0e for me, Win 7 Home Premium, SP1, all in 64 bit. I open Adobe Photoshop Elements 9.
Elaine Fagundes wrote on 8/11/2011, 5:46 PM
very good, open grafic editors. in photoshop cs5.5 for vegas. the best resolution.
thank
ushere wrote on 8/11/2011, 5:48 PM
as in other thread: started working when I set vegas to open as administrator.
JohnnyRoy wrote on 8/12/2011, 4:29 AM
> "as in other thread: started working when I set vegas to open as administrator."

That's odd because this works for me and I never open Vegas as an administrator. Are you working from some "limited" user account? If your account is not an administrator in Windows, it should be. Working as a non-administrator is severely broken in Windows and doesn't work like it does on Unix and the Mac. Microsoft never quite understood how to do this right even though they tried to fix it in Windows 7.

~jr
JJKizak wrote on 8/12/2011, 4:53 AM
JohnnyRoy:
I am not working from a limited user account. I use Vista 64bit with both Vegas 10E 32/64 bit. After setting Vegas to open as administrator I lost the Shuttle pro operation which worked fine before. DVD-A-Pro 5.2 was not opening either and the reccommended fix (Sony Support) was to "Open in Adminstrator" but I discovered this too late and 5.2 would not uninstall so I removed all 5.2 stuff from the registry and it still will not re-install. Sony Support says to re-install Windows. I don't wanna do that at this time.
JJK
ushere wrote on 8/12/2011, 5:22 AM
win 7 64bit - logged on as admin (there are no other users). until i couldn't get 'open with....' to work i've never encounter any problem whatsoever regarding user rights. opening vegas as admin cured the open with... straight off.

everything else, so far seems (thankfully!) unchanged.
JJKizak wrote on 8/12/2011, 2:19 PM
When I set Vegas 10E to run as administrator I lost the shuttle pro operation. This was because when I open "Shuttle Pro" the "user account control" stops it. I went into the user stuff in the control panel and shut off the "user account control", re-booted and everything worked fine without putting Vegas as administrator. So now everything works including DVD-A 5.0B which had to be in the administrator mode also. This is what initially caused my DVD-A 5.2 to self destruct. Sorry about mis-leading in my previous threads.
JJK