Comments

jetdv wrote on 3/26/2004, 7:38 PM
As far as I know it is not possible for one script to call another one. Not sure about C# though.
JohnnyRoy wrote on 3/26/2004, 8:35 PM
Thanks Ed, that's what I figured. I guess the host application is the only one who can hand things off the scripting engine.

~jr
johnmeyer wrote on 3/26/2004, 11:03 PM
Arthur Bueno, the author of the "MULTICAM WITH TAKES" script did manage to call one script from another. It was a jolly fine kludge, but it worked. If you assign a script to one of the ten Vegas script keys (Ctrl-1, Ctrl-2, etc.) you can use "Sendkeys" to invoke another script. Obviously it depends on the user configuring Vegas so the appropriate script is assigned to the correct key. The rather clever thing that Arthur did was to use this in a recursive manner so the script calls itself. He used this to do another thing that you can't do with scripts, namely group events. Not pretty, but it works.

I think he removed the scripts from Sundance. This was the thread where he discussed it:

Multicam scripts
jetdv wrote on 3/27/2004, 4:46 AM
I remember that as well. However, this is truly a kludge and requires too much preparation by the user and is limited to 10 scripts at the present. I would rather simply be able to call another script without having to worry about specific setups. However, it might work for your purposes.
macdo wrote on 3/27/2004, 6:07 AM
Whats happens if u read the js like in Visual Create.FSO ReadLine, the u loads into memory and then u run it?
JohnnyRoy wrote on 3/27/2004, 2:35 PM
Hmmm... I'll have to look into that. That sounds interesting.

~jr
roger_74 wrote on 3/27/2004, 4:05 PM
I made a few attempts: http://mediasoftware.sonypictures.com/forums/ShowMessage.asp?MessageID=162922&Page=0

You might try exploring SonyEPMs suggestion in his last reply in the thread.
sturm wrote on 3/28/2004, 4:36 AM
I got the idea of recursive scripts from "klaymen", he was the first to describe it on this forum, he also found a way to access Vegas internal grouping (quite complicated). From what I can see he managed to have a script call itself without restricting you to a scriptkey (probably it reads the scripts-assignment from the registry). But all in all it would be so much easier if Vegas would include a grouping method in the API.
jetdv wrote on 3/28/2004, 11:21 AM
That particular technique uses the "sendkeys" command to automatically press "CTRL-#" (where # is the assignment number of the script) and then exits. It DOES rely on the script being assigned to a specific number. It uses the registry to determine whether or not this was a recursive call.