vMix Forums
»
General
»
GT
»
Only long text scroll lower thirds
Rank: Advanced Member
Groups: Registered
Joined: 9/27/2019(UTC) Posts: 48 Location: Kuressaare
|
Hi.
How to make scrollable text. If text longer than graphics element, it's scrolling, other way, if text not long, no scrolling
Thank you
|
|
|
|
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: NSCPro Hi.
How to make scrollable text. If text longer than graphics element, it's scrolling, other way, if text not long, no scrolling
Thank you Code:put text in textblock and ticker
calculate length of text
if length is longer than textblock
show ticker
else
show textblock
end if
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 9/27/2019(UTC) Posts: 48 Location: Kuressaare
|
I must add this code to script?
|
|
|
|
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: NSCPro I must add this code to script? No this isnt the code. its a description of the logic to use
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 9/27/2019(UTC) Posts: 48 Location: Kuressaare
|
Do you have some sample how do that?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 1/25/2019(UTC) Posts: 302 Thanks: 17 times Was thanked: 79 time(s) in 60 post(s)
|
Here is an example of how to determine the length of a text and perform different actions based on the length. However, this is not a turnkey solution to your problem, that will require a little more work on your part. There is probably also such an example in doggy's "scripting for dummies" always a worthwhile way to solve such questions. Code:dim text as string
dim count As Integer
'the next line gets a text from a title
text = input.find("Title 0- The Classic Blue.gtzip").Text("Headline.Text")
'the next line counts how many characters are in the text
count = text.length
console.writeline (text)
console.writeline (count)
If count > 10 Then
console.writeline ("count is greater than 10")
'here you could start your ticker
Else
console.writeline ("count is not greater than 10")
'here you could start your title
End If
'the console.writeline lines are only for your information in the script window
'adjust the number, in this example 10, to your needs
|
|
|
|
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: NSCPro Do you have some sample how do that? a textbox and a ticker having a width of about 15 characters for example of the used font (not precise when using proportional fonts ) one on top of the other Code:dim boxlength as integer = 15
do while true
dim TickerText as string = Input.Find("sometitle.gtzip").Text("TextBlock1.Text" )
dim length as integer= TickerText.Length()
If length >= boxlength
API.Function("SetTextVisibleOff",Input:="textorticker.gtzip",SelectedName:="TextBlock1.Text" )
API.Function("SetTextVisibleOn",Input:="textorticker.gtzip",SelectedName:="Ticker1.Text" )
else
API.Function("SetTextVisibleOn",Input:="textorticker.gtzip",SelectedName:="TextBlock1.Text" )
API.Function("SetTextVisibleOff",Input:="textorticker.gtzip",SelectedName:="Ticker1.Text" )
end if
sleep(100)
Loop
wonder why you don't use automatic textbox resizing instead as IMO it looks weird ( to put it nicely)
|
|
|
|
vMix Forums
»
General
»
GT
»
Only long text scroll lower thirds
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