0

How to include a colon in live text

I'm attempting to display a timer (counting up - not down) by sending the current time through a user variable to a Live Text box.  I can do that if I select the option to specify a fixed variable.  

Since I would possibly like to use other externally updated user variables, I want to specify the variable in the serial or UDP message.

But if I attempt to have the input specify the variable, the colon that needs to display on screen conflicts with the syntax using a colon to separate the variable name from the value.  How can I do this?

5 comments

  • 0
    Avatar
    Dick Trump

    Responding to my own message here.  I figured out how to come close to what I wanted by using two user variables, one for the minutes and one for the seconds separated by a fixed text colon.

    The only problem with this is that when the timer is not running, I don't want to display anything.  With this solution, the colon always displays.  So is there a way to make the fixed text disappear?  Or possibly have the whole zone disappear by using some other kind of variable?

    Or - going back to my original query - how to display a colon as part of a user variable.

  • 0
    Avatar
    Bright Scripters

    There are a few solutions to that.

     

    You could use a third variable that holds the colon character, and assign nothing to that variable, when you need the colon to disappear.

    An entire zone can be hidden with a command

    You could also dig into the autorun, and change it so variable assignment, doesn't use the colon character as a separator, but instead it uses a different character :)

    Interested?
     

  • 0
    Avatar
    Bright Scripters

    You could modify the autorun to look for two colons instead of a single one, for user variables assignment via UDP.

    Here is how.

    In the autorun.brs, go to line 12298, and change it from

    This

    To that

    Save the file under a different name, and assign it as a custom autorun, in your presentation properties.

    You would then be able to send udp strings like 

    time::12:45

     

  • 0
    Avatar
    Dick Trump

    Excellent!  Thank you.  I actually implemented both solutions - using the double colon as the delimiter and using the hide/show zone actions to do some color highlighting when a certain time is reached.  I think I'm good to go on this now.

    FWIW, this is to superimpose a speaker timer over other content in a city council setting.  Only the mayor sees that.  All other content is displayed to the public and is managed with a control system and video over IP solution.

  • 0
    Avatar
    Bright Scripters

    Good job!

    Thanks for sharing the results.

    My advice is, test well! :)

     

Please sign in to leave a comment.