How can I create text messages that automatically change every so often?

gaveitatry

New Member
I used static text messages. I used horizontally scrolling text messages. But neither are what I really want. I want text that changes every so often. So let's say that I have a text message at the bottom center of my screen. It says "Thank you for following". After x number of minutes, I want that message to be replaced with something else like "Check out my Discord link below." And then x number of minutes later, maybe a totally different message. And then have it go back to the very first text message and do it all over again. Text messages that change and rotate. Like A, B, and C, then back to A, B, and C again, and so on. Is there a way to do this without using any hotkeys or manually making changes every so often? I want this to be automatic. And I am not going to use the text message examples above. My text messages are going to be different and longer. I asked this question on Reddit, and someone said that I will need to create a script (like Python) or use a Plugin. I looked at five pages of Plugins and I don't think any of them do what I want. I found a script, but I don't know how to use it and don't even know if it does what I want. I want to create my own script, but I don't know anything about scripting or where to start. I always have text on the bottom center of my screen. And the only way to fit in a lot of text is to use a horizontal scrolling text filter. But I don't want horizontal scrolling text. So I just use one short static message and I rarely change it. But if I had a script that automatically changed and replaced the text every so often, I could display one short text message and then a few minutes later it will change to another text message by itself. That would be so cool. But I have no idea how to do that. Will anyone help?
 

gaveitatry

New Member
Update: I installed Python. I don't if I need it and I don't even know how to use it. I still can't get the OBS Script I downloaded to do anything. I go to Top Menu > Tools > Scripts > and then I set the path to the .py I downloaded. Then I pointed the Python path to C:/Users/Brian/AppData/Roaming/Python. And I don't know what to do after that. The name of the Script is Scripted Text and I have no idea if it is what I need and does what I want.
 

upgradeQ

Member
You might try using this code since you have Python installed:


Python:
from pathlib import Path
from itertools import cycle
from time import sleep

absolute_path = r"C:/Users/Brian/Documents/slideshow.txt"
p = Path(absolute_path)
msg = "msg 0"
messages = cycle([msg, "msg 1", "msg 2 ", "msg 3"])

while True:
    x = 1
    sleep(60 * x)
    with open(p, "w") as f:
        f.write(next(messages))
 

GeeMack

Member
You can do that with the "Move Transition" plug-in. It has options to show or hide sources at timed intervals.
 
Top