Community Forums Archive

Go Back

Subject:VS2003 development question
Posted by: D-Slam
Date:1/17/2006 6:57:20 AM

A question before investing in Visual Studio 2003...

Can I enhance my SF scripting (C#) to include dialogs I create in VS? I'd like to collect info from custom dialogs, and use various UI widgets to control certain asspects of my post-processing scripts. Can this be done?

Can I do it with VS2002 under .NET 1.0? or do I have to have to add this functionality using VS2003 / .NET_1.1?

Any input, war stories, pointers, or work-arounds would be greatly appreciated.

Subject:RE: VS2003 development question
Reply by: jetdv
Date:1/17/2006 7:15:06 AM

All of the scripts I've written for Sound Forge have been in VS2003. And, yes, it allows you to visually design the screens used for input. Another great thing is the "Auto Complete" function which can also work with the Sound Forge objects.

Subject:RE: VS2003 development question
Reply by: D-Slam
Date:1/17/2006 8:57:53 AM

Thanks. That's helpful...

And I assume these .cs files can be called from the SF Scripting menu or do they have to be compiled as a stand alone .exe that invoke SF?

Is there any way to kludge this kind of dev using VS2002 .NET1.0?

Subject:RE: VS2003 development question
Reply by: jetdv
Date:1/17/2006 10:57:22 AM

I compile to a .dll file. Sound Forge can directly open the .dll files.

Subject:RE: VS2003 development question
Reply by: _TJ
Date:1/18/2006 6:18:24 PM

Compile your script into a dll assembly, then put that assembly into Sound Forge's "Script Menu" folder, and your dll will show up as an item on the Script Menu.

It is not possible to invoke Sound Forge methods from a stand-alone exe.

You can include multiple scripts into a single dll by having your EntryPoint.FromSoundForge() method look for arguments and then forward on to other classes in your assembly based on the arguments.

To pass arguments to your script, just create a .LNK file containing the assembly (dll) pathname and arguments and put the .LNK file into your "Script Menu" folder.
Or use the edit box at the top of the Script Editor window in Sound Forge to pass the arguments. Note: that this second method only works when the script is run using the run script button on the Script Editor.

I don't know about .NET 1.0, that doesn't work as far as I know.

tj


Message last edited on1/18/2006 6:18:43 PM by_TJ.

Go Back