Invoke script with parameters

nonam3 wrote on 3/3/2025, 4:58 AM

Hello,

Is it possible to run vegas that will auto invoke script and that script will read parameters provided during vegas invocation?

To expand more on the topic I want to do something like this:

vegas.exe -SCRIPT:myScript.cs "path/to/file.veg" "path/to/media/directory"

and inside script "myScript.cs" I want to read these 2 passed parameters ("path/to/file.veg" "path/to/media/directory")

What I want to achieve is to write script (can be extension etc.) that will auto update my veg project ("file.veg") with new media (located in i.e. "path/to/media/directory"). In my case because I have multiple veg files in one location that are referring to multiple media in different locations I need a way to pass those parameters.

Thanks in advance for any feedback.
Best regards

 

Comments

jetdv wrote on 3/3/2025, 8:44 AM

jetdv wrote on 3/3/2025, 8:57 AM

RUNSCRIPT

Starts VEGAS Pro and runs the specified script.

EXAMPLE

Vegas220.exe /RUNSCRIPT "C:\CustomScripts\ScriptName.cs" 

—or—

Vegas220.exe /SCRIPT "C:\CustomScripts\ScriptName.cs"

SCRIPTARGS

Starts VEGAS Pro and passes the specified arguments to a script.

EXAMPLE Vegas220.exe /SCRIPTARGS "<argument>" /SCRIPT "<script path>"

 

https://help.magix-hub.com/video/vegas/22/en/content/topics/11-autoscript/scripting_in_vegas.htm?tocpath=Working%20with%20VEGAS%20Pro%7CAutomation%20and%20Scripting%7CUsing%20Scripting%7C_____0

nonam3 wrote on 3/3/2025, 9:08 AM

@jetdv This is exactly what I was looking for.

THANK YOU !!!

davider wrote on 3/8/2025, 7:03 PM

@jetdv

Vegas220.exe /SCRIPT "C:\CustomScripts\ScriptName.cs"

Hello, I am a beginner. Thank you for sharing.

Using the above command always starts a new VEGAS window, which takes a long time to launch.

I have an idea: if a VEGAS window is already open, run the script directly instead. Is this possible?

Thanks in advance!

jetdv wrote on 3/9/2025, 7:53 AM

Only if you do it like in the tutorial above and run it from a Custom Command. Using the command line in a BAT file, it will always start a new instance of VEGAS.