Originally Posted by: mikeborschow Originally Posted by: doggy
Why not just set the value in the dynamic value for the called script to read , could even be a reference to say a text file for a script to take on , even a whole script in said textfile
We don't know how this works, please explain.
Aha
Research and learn! Not dismiss!
Quote:
Let's say for example that we want to load a video for a background that is part of a multi layer input. The script is going to build the multi layer input with all the proper elements. We need to tell the script the file to use for the video. Let's also assume we will provide a few variables for the text information and a sleep time (example 5000 for 5 seconds) for running other events as part of the script.
How were you going to provide ( or get from) the details for the variables in the first place ?
Data sources comes to mind for example , all details per row of the list
BTW: your in for a treat with loading/adding inputs to use to build a MV without preloads and existing inputs ( i would rethink this path)
Quote:
Using Dynamic Values, how will we send those variables to the script? Again, as stated previously, we're not really interested in creating an XML or Text file first and then asking vMix to read that file, we just want to send the necessary data directly to the script via the RESTful API call.
Again , are you going to manually enter the value details? Where will you get them from during the production? how will you control that? typing , pressing buttons? how ?
Why fixate on http calls and not let a script make decisions and execute accordingly. scripts can be just one line but also a whole program and can call others etc
Or one can write an external app to make defining and sending the variables more practically. What's your actual workflow?
Quote:
Can you please provide an example? How would we pass 5 different variables to the script using Dynamic Values?
Would we be limited to only 4 scripts?
I already mentioned data sources but if using a dynamic value one can build a structure in this (1) value containing all the elements
vMix has function to write and read these dynamic values, extract details etc
example:
?t=1123
Do not assume anything when defining a script (program) , make a logical flow!
Suggest to read through
https://forums.vmix.com/...86-Scripting-for-DummiesWhile the initial FR is interesting i do not believe it is going to solve your intentions
But if you insist
http://127.0.0.1:8088/api/?Function=SetDynamicValue1&Value=A,B,C
http://127.0.0.1:8088/API/?Function=ScriptStart&Value=ScriptName
In the called script read the DynamicValue1 ( from the API XML) , split the values (on ",") and do whatever you want with those values into functions or whatever