0

Execute BrightScript?

Greetings

I am quite new to BrightSign players, and I'm a complete beginner using BrightScript. I got a couple of questions concerning BrightScript. It might be pretty stupid questions, and the answers might be pretty obvious. I hope someone is able to help me. I do apologize in advance for my ignorance.

I have been studying the BrightScript syntax for a couple of days, and I'm beginning to understand the overall setup. My main question is: how do I excute the script? So far, I have understood, that I should write the script and save it in a .brs file. If I save it as autorun.brs and place this file in the root of SD card, the script will be excecuted when, the player is rebooted. Is that correct?

But how do I execute functions like "PlayFile()" ect. from my local workstation.? Can I use Command Promt? Or do I need a specific tool?

Thanks in advance for your help.

Cheers

Anders

12 comments

  • 0
    Avatar
    Bright Scripters

    Before we dive deep into details, would you tell us something about what is it that you are trying to accomplish?

    Being a beginner, my inclination is to steer you toward using BrightAuthor.

    Here are videos that could give you a broader picture of your options

    https://www.brightsign.biz/support/training/tutorial-videos

    This one is focused on BrightAuthor

    http://brightsignbiz.s3.amazonaws.com/videos/step-by-step/Training%202.2%20BrightAuthor%20Introduction.mp4?custom=true&width=520&height=330

  • 0
    Avatar
    Bright Scripters

    Any luck?

  • 0
    Avatar
    Anders Peder Rathmann DFI

    Oh yes. Thanks for asking.

    I have being using BrightAuthour for some time, and it works fine to create and publish presentations.

    But I had a major breakthrough recently. I was able to connect my BrightSign mediaplayer via Telnet by its IP address using a standard command promt. And after that I was able call the commands to BrightScript from here. So I'm able to start, stop, pause, resume ect. specific video files.

    Further more, I have suceeded to connect to the BrightSign player via Telnet in my .NET/C# solution, and call the commands to BrightScript from there.

    So everything is lovely.

    Cheers.

    Anders

     

  • 0
    Avatar
    Bright Scripters

    Excellent!

    You are only scratching the surface.
    There is a lot more to discover and make happen with the player.
    UDP messages could also be useful for integrating other solutions.
    What are you trying to create?

    Info@brightscripters.com

  • 0
    Avatar
    Horacio Cruz

    Hi Bright Scripters,

    Im doin somethin like Anders Peder Rathmann DFI, the difference is Im connecting the player via SSH with Java and works fine.

    The problem is: if Im in debugger mode(to call the commands  from Brightscript) the flow stops until I exit from debugger mode, obviously it is not a good option

    So, my question is: Is it possible retrieve data from Brightscript to Java in another way or at least not in debugger mode??

    Reding your last post here about the UDP messages, i took  alook on this: https://developer.roku.com/es-mx/docs/references/brightscript/components/rodatagramsocket.md, but I really dont understand how It works(Im still working on this), Is it possible in some way send UDP messages from Java to execute Brightscript commands and get the results?

    Does anyone knows something about this?

    Cheers and Thank you

  • 0
    Avatar
    Bright Scripters

    Hi Horacio,

     

    It is unclear to me, what it is you are trying to accomplish. Please describe in few word, the desired end result.

    Is your intention to use ssh as a solution, or is ssh being used for debugging only?

    When you mention Java, do you refer to JavaScript?

     

    If you are looking to bridge between BrightScript and JavaScript, please look at

    https://docs.brightsign.biz/display/DOC/JavaScript+API

     

     

  • 0
    Avatar
    Horacio Cruz

    Hi, thanks for your reply,

    First: With Java I mean Java of Sun Microsystems

    Second: Yes Im looking a bridge between BrightScript(BS) and Java(but not JavaScript)

    Third: I think I have it, what Im doing is send UDP messages from JAVA to BS to do something with the player and BS response in the same way (UDP Message) to JAVA, and until here is working.

    What Im doing now is testing diferentes ways, but I think is going to work

    Thank you so much

  • 0
    Avatar
    Bright Scripters

    Java support does seem to be minimal...

    https://docs.brightsign.biz/display/DOC/roJRE

     

    If UDP is the way to go, I trust that you are using the Loopback Address?...

  • 0
    Avatar
    Horacio Cruz

    Yes, Im using the same IP but different port, because if I use the same y had an error about using the same Address. Is it that you are meaning when you say "Loopback Address", it is?

  • 0
    Avatar
    Bright Scripters

    Loopback Address is 127.0.0.1, which like localhost.

    Using one or the other might be more manageable, over use of a static IP such as 192.168... 

  • 0
    Avatar
    Horacio Cruz

    Oh yes, Im using localhost, thank you

  • 0
    Avatar
    Brandon

    You cannot use the same UDP port that BrightAuthor listens on to send anything from Java, JavaScript, or anything else that isn't BrightAuthor since BrightAuthor "owns" that port.

    You can send to that port, but you must use a different local origin port.

    _________________________________________________________________________

    Friendly reminder, the community forum is intended for user-to-user discussion.  It is not regularly monitored. For troubleshooting problems and to ensure a timely answer from a BrightSign representative, please submit a support ticket.

Please sign in to leave a comment.