Community Forums Archive

Go Back

Subject:Compiling scripts outside of SoundForge8
Posted by: wdr
Date:4/12/2006 2:32:20 PM

Is it possible to compile the script outside of SoundForge8 using Visual Studio .NET? When I try, it can't find the 'SoundForge' namespace even though I have a 'using' statement. What I want to do is make a DLL that I can call from other programs and have it open Sound Forge, run the script, close it. Is this possible? Or to automate it, will I have to use a DOS shell and do something like

forge80 /Script:myscript.cs


Subject:RE: Compiling scripts outside of SoundForge8
Reply by: _TJ
Date:4/12/2006 2:59:04 PM

No. Sound Forge must be the host of the script.

You can have a dll that executes Forge80.exe with command line arguments telling it to run a particular script.


"c:\Program Files\Sony\Sound Forge 8.0\Forge80.exe" /Script:"c:\MyScript.cs"


You don't have to use a DOS shell to do this, you can also use CreateProcess() or ShellExecute() or their script equivalents like System.Diagnostics.Process.Start( ... )



tj

Subject:RE: Compiling scripts outside of SoundForge8
Reply by: jetdv
Date:4/12/2006 7:02:31 PM

Right-click "References" in your VS2003 project, choose "Add", and then browse to and select Forge80.script.dll and your "using" statement should work fine. Code completion is also available. However, even if you compile to a DLL file it must still be run from inside SoundForge. However, it is easier to code this way.

Go Back