Subject:TJ's Tricks: Drag Current File To Vegas
Posted by: _TJ
Date:5/20/2005 1:42:23 AM
Over in the general Sound Forge forum, Angel suggested that we should be able to drag a file from Sound Forge and drop it on Vegas. This seemed like a good idea, and It occurred to me that this could probably be done with a script. So I decided to try it, and it works. The result is a script that will save the current file if necessary, and then show a form with the filename and a cancel button. You can grab the filename and drop it on Vegas, just like you would grab a filename from the Windows' Explorer. search for lbl.DoDragDrop() to find the code that does the key bit. search for filehost.Save if you want to modify the code to save to a different filename or folder. ------------ snip and save as DragToVegas.cs ------------
---------------- end of script ------------ tj Message last edited on11/8/2007 9:55:28 PM by_TJ. |
Subject:RE: TJ's Tricks: Drag Current File To Vegas
Reply by: Angels
Date:5/22/2005 10:12:54 AM
Thank you TJ! This is just fantastic! I'm going to try customizing it to generate a file name (random or incremental) at a default location, so that the save will be invisible. That way I can skip the save part. On reflection, it should also be possible to auto create a copy, auto save it, allow the drag and drop transfer, and close the file in Forge. That way the original file in Forge can keep it's edit history, and I can undo, modify and re-transfer. After clearing unused files, I always close my Vegas projects with "copy all media" to make sure all project files are in one location . I think you may have created a monster ;) More thanks in the Forge forum... Angel |
Subject:RE: TJ's Tricks: Drag Current File To Vegas
Reply by: _TJ
Date:5/22/2005 4:08:14 PM
Sounds good. Be aware that if you use file.SaveAs(), you get the same behavior as Save As on the File menu. (i.e. the default save name and path is changed as well). Use file.RenderAs() to save all (or part) of the file to a new file without changing the default save name and file type. tj |
Subject:RE: TJ's Tricks: Drag Current File To Vegas
Reply by: Ben
Date:11/8/2007 7:44:15 PM
Edit: oops! Please ignore! I re-pasted the script and it's working fine now - not sure what I did wrong. Resurrecting an old thread... I can't get this script to work with Sound Forge 9c. On running the script I get the following error: System.ApplicationException: 10 compiler errors. at SoundForge.ScriptHost.CodeDomScriptManager.Compile(String szFile, String szSourceText) at SoundForge.ScriptHost.RunScript(String szFile, String szSourceText, EngineType eType, Boolean fCompileOnly, Boolean fDebug) Any ideas what's going wrong? Thanks! Ben Message last edited on11/8/2007 7:47:45 PM byBen . |