Docking a Script Form

niko-p wrote on 9/28/2018, 1:06 PM

Hello,

I just started writing scripts for Vegas and things are working out just fine.

I am still wondering if it is possible to somehow display a Windows.Forms from a script inside a Vegas window? Like with effect plug-ins.

While running a form Vegas is blocked and it would be nice if the user could interact with the program while the form is open.

 

Is this possible?

Comments

VEGASDerek wrote on 9/28/2018, 1:10 PM

You need to create an application extension in order to do what you are wanting to do. Scripts are intended to be used for a single, one time operation on a project.

Please see the Scripting FAQ document's section on application extensions.

https://www.vegascreativesoftware.com/fileadmin/user_upload/non_product/downloads/vegas_scripting_faq.zip

 

niko-p wrote on 9/28/2018, 5:29 PM

You need to create an application extension in order to do what you are wanting to do. Scripts are intended to be used for a single, one time operation on a project.

Please see the Scripting FAQ document's section on application extensions.

https://www.vegascreativesoftware.com/fileadmin/user_upload/non_product/downloads/vegas_scripting_faq.zip

Thank you very much!

I just converted my C# Script into a Application Extension suitable Code and compiled it as a .dll.

The window shows up and works fine. Only when I try to interact with the Vegas object (add markers and so on) I get errors.
This wasn't a problem with the script.
What am I doing wrong?

Harold-Linke wrote on 9/29/2018, 4:13 AM

I ahd the same issue before.

In an Extension you need to put all changes to VEGAS into an UndoBlock:

    void HandleCommandInvoked(Object sender, EventArgs args)
    {
        using (UndoBlock undo = new UndoBlock("Sample Commands"))
        {
            // make your changes to the project here. in this case,
            // the method call below will return false if no changes
            // are made or the changes should be reverted.

        }
    }

This is explained in the changes.txt file on the old Sony SDK. So very difficult to find.

Harold

niko-p wrote on 9/29/2018, 4:27 AM

I ahd the same issue before.

In an Extension you need to put all changes to VEGAS into an UndoBlock:

    void HandleCommandInvoked(Object sender, EventArgs args)
    {
        using (UndoBlock undo = new UndoBlock("Sample Commands"))
        {
            // make your changes to the project here. in this case,
            // the method call below will return false if no changes
            // are made or the changes should be reverted.

        }
    }

This is explained in the changes.txt file on the old Sony SDK. So very difficult to find.

Harold

It works!!

Thank you very much!