vMix Forums
»
General
»
General Discussion
»
Scripting DataSource multiple rows
Rank: Member
Groups: Registered
Joined: 4/14/2020(UTC) Posts: 17 Location: Dallas, TX Thanks: 5 times
|
I have a data table I am pulling into GT Title Designer and have written a script to change the input source. This works great for the first row, but I want to be able to loop through all rows from my table and execute the command for all rows.
Is there any easy way to do that? My Table contains 3 columns, Input Number, Input Name, and Source. I will have 10-20 rows, and I would like to run a script to execute each of those rows in one command.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,220 Location: Belgium Thanks: 291 times Was thanked: 953 time(s) in 788 post(s)
|
Originally Posted by: cchhita I have a data table I am pulling into GT Title Designer and have written a script to change the input source. This works great for the first row, but I want to be able to loop through all rows from my table and execute the command for all rows.
Is there any easy way to do that? My Table contains 3 columns, Input Number, Input Name, and Source. I will have 10-20 rows, and I would like to run a script to execute each of those rows in one command.
DataSOurceNextRow fubction within the script ? Else more info needed
|
|
|
|
Rank: Member
Groups: Registered
Joined: 4/14/2020(UTC) Posts: 17 Location: Dallas, TX Thanks: 5 times
|
I tried to use some code I found in the Scripting for Dummies section, but it does not advance to the next row. Here is what I have:
dim dataSource as String = setting.SelectSingleNode("/event/data-source/@name").Value dim x as integer Dim Index as integer =0 Do while Index <=6 for x = 1 to 5 API.Function("DataSourceSelectRow", Value:="dataSource,x") next x index +=1 loop
I have code that will execute the first row, and that works great, but I want it to loop through all rows and execute every row in the datasource
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,220 Location: Belgium Thanks: 291 times Was thanked: 953 time(s) in 788 post(s)
|
Quote:have written a script to change the input source My Table contains 3 columns, Input Number, Input Name, and Source. Think we are missing some explanation to the above advancing to next row has been explained using the appropriate function changing the inputsource based on the datatable is th confusing part , Care to explain pls
|
|
|
|
Rank: Member
Groups: Registered
Joined: 4/14/2020(UTC) Posts: 17 Location: Dallas, TX Thanks: 5 times
|
I was trying to have my script read an excel spreadsheet, where someone would enter in an NDI data input name, and when the script was run, it would that VMIX input to that particular NDI input.
I now have it working the way I need it.
part of my code that I needed to write looks like this:
for x = 1 to totalRowCount API.Function("NDISelectSourceByName", Input :=ndiInputNumber, Value := ndiInputName) API.Function("DataSourceSelectRow", Value:="dataSource,x") next x
|
|
|
|
vMix Forums
»
General
»
General Discussion
»
Scripting DataSource multiple rows
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close