vMix Forums
»
General
»
GT
»
Position an object based on data source
Rank: Advanced Member
Groups: Registered
Joined: 5/10/2020(UTC) Posts: 104 Location: Sacramento, California Thanks: 13 times Was thanked: 5 time(s) in 5 post(s)
|
Is it possible to use a number in a Google Sheet to set the x position of a PNG sequence? My client wants the animated backplate to be positioned based on how long the text is for each lower third.
I can count the string length and figure out the right multiplier, but is it possible to use that number from the data source to position that object?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,243 Location: Belgium Thanks: 294 times Was thanked: 960 time(s) in 794 post(s)
|
Originally Posted by: Geoff B Is it possible to use a number in a Google Sheet to set the x position of a PNG sequence? My client wants the animated backplate to be positioned based on how long the text is for each lower third.
I can count the string length and figure out the right multiplier, but is it possible to use that number from the data source to position that object? Not within the (same) GT title One can position (pan) an input though with shortcut/function
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 5/10/2020(UTC) Posts: 104 Location: Sacramento, California Thanks: 13 times Was thanked: 5 time(s) in 5 post(s)
|
Originally Posted by: doggy Not within the (same) GT title One can position (pan) an input though with shortcut/function Hi Doggy, I appreciate your reply! I could just do the text part in GT Title and do the PNG sequence (backplate) in vMix. But I'm still trying to figure out how to get the number from the data source into the shortcut/function. I'm guessing a hidden cell in the title is part of the method. But how to read the data from the hidden cell and put it into the SetPanX function?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,243 Location: Belgium Thanks: 294 times Was thanked: 960 time(s) in 794 post(s)
|
Originally Posted by: Geoff B Originally Posted by: doggy Not within the (same) GT title One can position (pan) an input though with shortcut/function Hi Doggy, I appreciate your reply! I could just do the text part in GT Title and do the PNG sequence (backplate) in vMix. But I'm still trying to figure out how to get the number from the data source into the shortcut/function. I'm guessing a hidden cell in the title is part of the method. But how to read the data from the hidden cell and put it into the SetPanX function? Check out the scripting for dummies post on how to read value from a title
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 5/10/2020(UTC) Posts: 104 Location: Sacramento, California Thanks: 13 times Was thanked: 5 time(s) in 5 post(s)
|
I have tried to extract the method from the scripting for dummies thread, but I'm getting syntax errors. I obviously don't understand the VB.net part. Code:dim xPos as decimal
xPos = Input.Find("vmware l3.gtzip").Text("Length.Text")
Function=SetPanX&Value=xPos,Input="Backplate"
Function=Overlay4In&input="L4 Comp"
The first two lines return syntax errors.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,243 Location: Belgium Thanks: 294 times Was thanked: 960 time(s) in 794 post(s)
|
Originally Posted by: Geoff B I have tried to extract the method from the scripting for dummies thread, but I'm getting syntax errors. I obviously don't understand the VB.net part. Code:dim xPos as decimal
xPos = Input.Find("vmware l3.gtzip").Text("Length.Text")
Function=SetPanX&Value=xPos,Input="Backplate"
Function=Overlay4In&input="L4 Comp"
The first two lines return syntax errors. The Error give explains what is wrong ! Quote:Script 'Script1' Error Line 2: Conversion from string to type 'Decimal' is not valid. One can not put a string into a decimal ( and visa versa), one needs to convert that Or read it to a string and convert it to a decimal after ( or in the function code)
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 5/10/2020(UTC) Posts: 104 Location: Sacramento, California Thanks: 13 times Was thanked: 5 time(s) in 5 post(s)
|
The Error give explains what is wrong ! Quote:Script 'Script1' Error Line 2: Conversion from string to type 'Decimal' is not valid. That's not the error I'm getting. This is the error I get: Error Line 1: Invalid Syntax: dim xPos as decimalIf I comment out line 1, I get another syntax error on line 2.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,243 Location: Belgium Thanks: 294 times Was thanked: 960 time(s) in 794 post(s)
|
Looks fine though (line 1) and works fine to (you know i do test ;-) ) Try with another name for the variable
rest of my comment stands though ( errors not always point to the location of where the couse of the error is , only where it happens
Variable As String !!!! and convert to a decimal ( other variable if needed) for use in the function
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 5/10/2020(UTC) Posts: 104 Location: Sacramento, California Thanks: 13 times Was thanked: 5 time(s) in 5 post(s)
|
Originally Posted by: doggy Looks fine though (line 1) and works fine to (you know i do test ;-) ) Try with another name for the variable
rest of my comment stands though ( errors not always point to the location of where the couse of the error is , only where it happens
Variable As String !!!! and convert to a decimal ( other variable if needed) for use in the function I appreciate your time! Seems like I can't dim anything. Am I missing a step that enables VB.net?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,243 Location: Belgium Thanks: 294 times Was thanked: 960 time(s) in 794 post(s)
|
Originally Posted by: Geoff B Originally Posted by: doggy Looks fine though (line 1) and works fine to (you know i do test ;-) ) Try with another name for the variable
rest of my comment stands though ( errors not always point to the location of where the couse of the error is , only where it happens
Variable As String !!!! and convert to a decimal ( other variable if needed) for use in the function I appreciate your time! Seems like I can't dim anything. Am I missing a step that enables VB.net? You are writing the script in the vMix Scripting right ? ( Settings -Scripting) You do save after edit right and then try to run ? make sure the right script is selected if you have more Check if you dont have multiple editing windows active And you are using vMix 4K or above ? There is no need to enable vb.net
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 5/10/2020(UTC) Posts: 104 Location: Sacramento, California Thanks: 13 times Was thanked: 5 time(s) in 5 post(s)
|
Originally Posted by: doggy You are writing the script in the vMix Scripting right ? ( Settings -Scripting) You do save after edit right and then try to run ? make sure the right script is selected if you have more Check if you dont have multiple editing windows active And you are using vMix 4K or above ? There is no need to enable vb.net • Yep, I'm pretty good at scripting, just not VB.net • I'm using vMix Pro • Just one editing window open • I can't even save the script to try to run it, I get the Syntax Error when I try to save. I had to comment out the first two lines in order to save. • I get a syntax error, no matter what the variable is called or how I try to define it (decimal, integer, string)
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,243 Location: Belgium Thanks: 294 times Was thanked: 960 time(s) in 794 post(s)
|
weird try create a new script or make sure there is nothig hidden within (complete clear )
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 5/10/2020(UTC) Posts: 104 Location: Sacramento, California Thanks: 13 times Was thanked: 5 time(s) in 5 post(s)
|
Originally Posted by: doggy weird try create a new script or make sure there is nothig hidden within (complete clear ) OK... if I just have the top two lines in there, it works fine. Seems like I need to convert the Function= lines into API.Function ? Trying to figure out the right syntax for those.
|
|
|
|
vMix Forums
»
General
»
GT
»
Position an object based on data source
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