Snapshot Script No Longer Works Correctly

2G wrote on 2/5/2008, 12:46 PM
I have a script that does jpg screen captures. It has three steps:

1) Change preview to Best (full) and changes interlace to progressive

2) Do a Vegas.SaveSnapShot(...) call

3) Restore preview window and interlace

This has worked fine for years. But in R8, it appears that Vegas is now delaying the actual changing of preview size/quality until the script terminates which is useless to me since the effect is now 1) capture; 2) set the preview to best; 3) restore the preview; Not exactly what the script was written to do. The snapshots are now coming out in whatever size/resolution the preview was set to before running the script.

To verify that this was indeed what was now happening, I removed the restore step (step 3). The preview window changed to Best(full) as expected. But the capture was still small. I tried it again with the preview starting out full size, and got a larger jpg.

I figure there was some change in the processing to no longer process GUI functions until after the script completes in order to speed up the script or something. But obviously, there was no consideration for the possibility that there are scripts out there that are expecting the GUI change to occur before the next step occurs in the script. You just broke my script.

Comments? Rationale?

Jerry



Comments

jetdv wrote on 2/5/2008, 7:51 PM
After you change the preview settings, add this line:


Vegas.UpdateUI();

(You may need to change "Vegas" to match your variable name for the Vegas object).

That should take care of it for you.
2G wrote on 2/6/2008, 9:28 AM
Thanks for the info.

Jerry
LReavis wrote on 2/20/2008, 11:35 AM
I'd be very grateful if someone could post a link to a working script that would do this snaptshot capture of stills - either to a file or to clipboard. Could someone do this please?
jetdv wrote on 2/20/2008, 12:38 PM
Here's a post where this was first discussed and the solution I posted.

Here's a direct link to the version modified for Vegas 8.
LReavis wrote on 2/21/2008, 12:54 PM
Thanks SO much. When I saw who posted the reply, I looked in Excalibur to see if I had overlooked its still capture capability - but could only get it to capture the current size of the preview screen (under the Assets tab). Anyway, I installed your posted script and observed a couple of surprises:

First - after I did a rescan of the script menu folder - I couldn't get the script to run when I click on it in the list; instead, Trackalyzer ran (the next script down). But when I clicked on the Run Script option under the Tools menu and manually chose the script all went well. I had a second instance of Vegas open, so I checked it and both worked just fine. My guess is that it's a memory issue - the Performance tab of the Windows Task Manager shows PF usage at 2.03 GB.

My second surprise came when the image I got didn't match the image shown in the Vegas Video Preview window. It shows an all-black background, with a couple of images I had created in Illustrator, plus text that I created with Media Generator. In contrast, the image in Photoshop showed a blank (.PNG transparent/alpha) background plus the imported images & the text. I realized that the black default background shown in Vegas when no media are present wasn't captured as black in the still. Not a problem, just something to remember when editing the image in Photoshop.

I capture a LOT of still images, and really missed the old snapshot scripts. This is going to save me a lot of time and I'm GRATEFUL. Thanks again, Larry Reavis
jetdv wrote on 2/21/2008, 7:29 PM
As far as I know, Excalibur *IS* capturing full size. I'll have to double check that and verify it's working correctly.