vMix Forums
»
General
»
GT
»
Only long text scroll lower thirds
Rank: Advanced Member
Groups: Registered
Joined: 9/27/2019(UTC) Posts: 48 ![Estonia Estonia](/Content/images/flags/EE.png) 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,171 ![Belgium Belgium](/Content/images/flags/BE.png) Location: Belgium Thanks: 288 times Was thanked: 942 time(s) in 778 post(s)
|
Originally Posted by: NSCPro ![Go to Quoted Post Go to Quoted Post](/Themes/yafpro/icon_latest_reply.gif) 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 ![Estonia Estonia](/Content/images/flags/EE.png) Location: Kuressaare
|
I must add this code to script?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,171 ![Belgium Belgium](/Content/images/flags/BE.png) Location: Belgium Thanks: 288 times Was thanked: 942 time(s) in 778 post(s)
|
Originally Posted by: NSCPro ![Go to Quoted Post Go to Quoted Post](/Themes/yafpro/icon_latest_reply.gif) 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 ![Estonia Estonia](/Content/images/flags/EE.png) Location: Kuressaare
|
Do you have some sample how do that?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 1/25/2019(UTC) Posts: 300 ![Switzerland Switzerland](/Content/images/flags/CH.png) Thanks: 16 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,171 ![Belgium Belgium](/Content/images/flags/BE.png) Location: Belgium Thanks: 288 times Was thanked: 942 time(s) in 778 post(s)
|
Originally Posted by: NSCPro ![Go to Quoted Post Go to Quoted Post](/Themes/yafpro/icon_latest_reply.gif) 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