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
Geoff B  
#1 Posted : Thursday, August 18, 2022 2:48:04 PM(UTC)
Geoff B

Rank: Advanced Member

Groups: Registered
Joined: 5/10/2020(UTC)
Posts: 104
Man
United States
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?
doggy  
#2 Posted : Thursday, August 18, 2022 5:58:22 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 960 time(s) in 794 post(s)
Originally Posted by: Geoff B Go to Quoted Post
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
Geoff B  
#3 Posted : Thursday, August 18, 2022 11:41:00 PM(UTC)
Geoff B

Rank: Advanced Member

Groups: Registered
Joined: 5/10/2020(UTC)
Posts: 104
Man
United States
Location: Sacramento, California

Thanks: 13 times
Was thanked: 5 time(s) in 5 post(s)
Originally Posted by: doggy Go to Quoted Post
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?

doggy  
#4 Posted : Friday, August 19, 2022 12:55:24 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 960 time(s) in 794 post(s)
Originally Posted by: Geoff B Go to Quoted Post
Originally Posted by: doggy Go to Quoted Post
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
Geoff B  
#5 Posted : Saturday, August 20, 2022 11:44:45 PM(UTC)
Geoff B

Rank: Advanced Member

Groups: Registered
Joined: 5/10/2020(UTC)
Posts: 104
Man
United States
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.
doggy  
#6 Posted : Sunday, August 21, 2022 12:53:25 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 960 time(s) in 794 post(s)
Originally Posted by: Geoff B Go to Quoted Post
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)
Geoff B  
#7 Posted : Sunday, August 21, 2022 1:13:14 AM(UTC)
Geoff B

Rank: Advanced Member

Groups: Registered
Joined: 5/10/2020(UTC)
Posts: 104
Man
United States
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 decimal

If I comment out line 1, I get another syntax error on line 2.
doggy  
#8 Posted : Sunday, August 21, 2022 1:20:01 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,243
Belgium
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
Geoff B  
#9 Posted : Sunday, August 21, 2022 1:22:46 AM(UTC)
Geoff B

Rank: Advanced Member

Groups: Registered
Joined: 5/10/2020(UTC)
Posts: 104
Man
United States
Location: Sacramento, California

Thanks: 13 times
Was thanked: 5 time(s) in 5 post(s)
Originally Posted by: doggy Go to Quoted Post
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?

doggy  
#10 Posted : Sunday, August 21, 2022 1:36:08 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 960 time(s) in 794 post(s)
Originally Posted by: Geoff B Go to Quoted Post
Originally Posted by: doggy Go to Quoted Post
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
Geoff B  
#11 Posted : Sunday, August 21, 2022 1:46:04 AM(UTC)
Geoff B

Rank: Advanced Member

Groups: Registered
Joined: 5/10/2020(UTC)
Posts: 104
Man
United States
Location: Sacramento, California

Thanks: 13 times
Was thanked: 5 time(s) in 5 post(s)
Originally Posted by: doggy Go to Quoted Post
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)

doggy  
#12 Posted : Sunday, August 21, 2022 1:53:12 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,243
Belgium
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 )
Geoff B  
#13 Posted : Sunday, August 21, 2022 2:05:07 AM(UTC)
Geoff B

Rank: Advanced Member

Groups: Registered
Joined: 5/10/2020(UTC)
Posts: 104
Man
United States
Location: Sacramento, California

Thanks: 13 times
Was thanked: 5 time(s) in 5 post(s)
Originally Posted by: doggy Go to Quoted Post
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.

Users browsing this topic
Guest (4)
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.