logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
cchhita  
#1 Posted : Saturday, January 14, 2023 2:18:36 AM(UTC)
cchhita

Rank: Member

Groups: Registered
Joined: 4/14/2020(UTC)
Posts: 17
United States
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.


doggy  
#2 Posted : Saturday, January 14, 2023 3:09:06 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,222
Belgium
Location: Belgium

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: cchhita Go to Quoted Post
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
cchhita  
#3 Posted : Saturday, January 14, 2023 7:19:31 AM(UTC)
cchhita

Rank: Member

Groups: Registered
Joined: 4/14/2020(UTC)
Posts: 17
United States
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
doggy  
#4 Posted : Saturday, January 14, 2023 8:57:15 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,222
Belgium
Location: Belgium

Thanks: 293 times
Was thanked: 955 time(s) in 790 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
cchhita  
#5 Posted : Thursday, January 19, 2023 6:19:10 AM(UTC)
cchhita

Rank: Member

Groups: Registered
Joined: 4/14/2020(UTC)
Posts: 17
United States
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
Users browsing this topic
Guest
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.