vMix Forums
»
General
»
General Discussion
»
Adding text to a title via scripting
Rank: Advanced Member
Groups: Registered
Joined: 3/30/2023(UTC) Posts: 112  Location: Chicago Thanks: 11 times Was thanked: 4 time(s) in 3 post(s)
|
Is it possible to add a line of text at the bottom or top of a text field and have the rest of the text already there scroll up or down?
Kind of like how an old-school terminal would look. Say 10 lines and then when the 11th line is received one line at the top or bottom is lost.
Now, the key to this is to do it via scripting so I can have dynamic data that is coming in and scrolling the older text up or down as noted.
Thank you,
Fritz Golman RadioDNA
|
|
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 11/27/2023(UTC) Posts: 110  Thanks: 5 times Was thanked: 6 time(s) in 6 post(s)
|
go to this link...may be helpful
|
|
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,458  Location: Belgium Thanks: 312 times Was thanked: 1009 time(s) in 831 post(s)
|
Guessing on top of that you like it to be animated 2 (scroll) ,has to be within a GT title , come from a vMix datasource , ....?
|
|
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 3/30/2023(UTC) Posts: 112  Location: Chicago Thanks: 11 times Was thanked: 4 time(s) in 3 post(s)
|
Not from a data source but created string variable within an existing script.
So, once again, imagine a terminal screen/window. As data comes in text is added to the bottom row. Each time text is added the text above that line scrolls up. The topmost line is eventually removed as the line below that becomes the top line. And so on, whenever new information is posted.
Now, I realize I can create an array and make those moves in the array and push the entire array to the text window but I'm wondering if there's a simpler way to do this. Or must it be brute force?
Thanks,
Fritz Golman RadioDNA
|
|
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 11/27/2023(UTC) Posts: 110  Thanks: 5 times Was thanked: 6 time(s) in 6 post(s)
|
Dont seem to inderstane what you want to do, you explanation is a bit confusing, but if you do a google search you just may find what you want
|
|
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,458  Location: Belgium Thanks: 312 times Was thanked: 1009 time(s) in 831 post(s)
|
how about: Code:'fill textblock with say 10 lines of text
'read content of textblock
dim str as string = Input.Find("nameoftitle.gtzip").Text("TextBlock1.Text")
'search for newline and delete text before it incl the newline = remove first line
Dim x = Environment.NewLine
Dim index = str.IndexOf(x)
If (index >= 0) Then
str = str.Substring(index + 1).Trim()
End If
' add you new text at end of current text
str += Environment.NewLine & "your new text"
'send back to textblock
API.Function("SetText",Input:=8,SelectedIndex:=0,Value:=str)
|
 1 user thanked doggy for this useful post.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 7/4/2021(UTC) Posts: 415  Thanks: 9 times Was thanked: 59 time(s) in 50 post(s)
|
I do it the opposite way (the top line goes to the bottom until it disappears off-screen) and I do it manually.
If your lines are a single line width/height, one of the things you may want to toy with is using multiple (single line) title fields, where the text moves between boxes, rather than having a single box that stretches the page.
That's how I'd do it if my current method wasn't better served by just manually filling a single box.
|
|
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 3/30/2023(UTC) Posts: 112  Location: Chicago Thanks: 11 times Was thanked: 4 time(s) in 3 post(s)
|
Thanks, ill give that a try!
Fritz Golman RadioDNA
|
|
|
|
|
|
vMix Forums
»
General
»
General Discussion
»
Adding text to a title via scripting
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