Hook to build in Vegas action

nonam3 wrote on 10/25/2024, 8:09 PM

Hello,

The problem:

When I split event (S shortcut) I usually perform action from / using my custom script. This is tedious and I would like to automated it.

Desired solution:

I would like to auto invoke my script just after performing Vegas action (i.e. splitting events by S).

The question:

- is there a build in mechanism to achieve this? I couldn't find anything.
- is scripting API capable of achieving such functionality? (namely firing up method after/before Vegas native tools are used)

Thanks in advance for reply

Best regards

Comments

zzzzzz9125 wrote on 10/25/2024, 9:07 PM

Desired solution:

I would like to auto invoke my script just after performing Vegas action (i.e. splitting events by S).

@nonam3 One of the best ways to do this is to rewrite a splitting method in your script and then assign S key to your script in Options -> Custom Keyboard.

- is there a build in mechanism to achieve this? I couldn't find anything.
- is scripting API capable of achieving such functionality? (namely firing up method after/before Vegas native tools are used)

If you are writing custom commands, you can use certain events that are triggered after Vegas operations, such as Vegas.TrackEventCountChanged, Vegas.TrackEventStateChanged, Vegas.TrackEventTimeChanged, and so on. However, after these events are triggered, you have to determine whether the action is in line with your expectations before you can perform what you want. It's complicated and not recommended if not necessary.

By the way, for a good running speed, if you are still using .cs scripts, I recommend that you compile them as .dll files to reduce the latency associated with running scripts. The delays in .cs script files are intolerable for such repetitive operations.

Last changed by zzzzzz9125 on 10/25/2024, 9:07 PM, changed a total of 1 times.

Using VEGAS Pro 22 build 248 & VEGAS Pro 21 build 208.

Information about my PC:
Brand Name: HP VICTUS Laptop
System: Windows 11.0 (64-bit) 10.00.22631
CPU: 12th Gen Intel(R) Core(TM) i7-12700H
GPU: NVIDIA GeForce RTX 3050 Laptop GPU
GPU Driver: NVIDIA Studio Driver 560.70

nonam3 wrote on 10/25/2024, 9:49 PM

Thanks @zzzzzz9125 for suggestions.

Unfortunately EventHandlers do have problem as You described and it's PITA to get correct event.

In the end I did rewrote my splitting method and invoked another method from within. Was easier that I thought.

Yes by "script" I mean c# "extension" (as they call them in manual) / dll. I don't invoke .cs directly.