VEGASPython
Commandline Interface
Attention: Not supported in the current build
Pythonscripts can now be started from the commandline together with VEGAS and commandline paremters can be passed to the script.
C:\Program Files\VEGAS\VEGAS Pro 16.0\vegas160.exe /SCRIPTARGS pythonscriptfilename /SCRIPTARGS arg1 /SCRIPTARGS arg2
- pythonscriptfilename: path and filename of the pythonscriptfile to be executed
- arg1: any text string as argument1
- arg2: any text string as argument2
The number of arguments is not limited.
The first /SCRIPTARGS must be the script filename.
Example:
C:\Program Files\VEGAS\VEGAS Pro 16.0\vegas160.exe /SCRIPTARGS "D:\pythonfile\test.py" /SCRIPTARGS arg1 /SCRIPTARGS arg2
If the filename or a parameter include blanks, then the parameter must be enclosed in ´„´. The pythonscript can access the commandline arguments as it is standard in Python via the variable sys.argv. This variable contains a list of strings with each argument as a separate string item in the list. The first item is the scriptfilename.
The python script:
for arg in sys.argv: print (arg)
gives as output:
[„D:\pythonfile\test.py“,“arg1„,“arg2„]