0

Scripting Question / Brightsign vs. Windows BS Emulator



Hello, In the following short script, I am trying to very simply read the names of some .jpg image files from a folder "/images/" and load them into an roImagePlayer object for display. Strangely, when working this way with the MatchFiles command generating a list of the jpgs within the script, the script will not compile (although it does compile successfully / work on the windows BrightSign emulator) .. on the HD1010 (with current release / non-beta firmware) it keeps getting an error. Any ideas what I might be doing wrong? And is this normal, for the BrighSign Windows emulator software (that I found in another post) to produce different results than the actual hardware, and to have different sensitivities to syntax? Thanks in advance, _Sven ------------------------------------------------- vm=CreateObject("roVideoMode") vm.SetMode("1920x1080x60i") imageDirectory="/images/" imageList=MatchFiles(imageDirectory, "*.jpg") EnableZoneSupport(1) im=CreateObject("roImagePlayer") im.SetDefaultMode(3) r=CreateObject("roRectangle",0,0,1920,1080) im.SetRectangle(r) p = CreateObject("roMessagePort") im.DisplayFile(imageDirectory+imageList[0]) gpio = CreateObject("roGpioControlPort") gpio.SetPort(p) loop: msg=wait(0,p) if type(msg)="roGpioButton" then im.DisplayFile(imageDirectory+imageList[1]) goto loop

1 comment

  • 0
    Avatar
    RokuLyndon


    Yes, the windows emulator can give you slightly different results. It hasn't been updated in a while, and might never be updated again. But, it's still useful for some testing.

    imageDirectory="/images/"

    This the only thing that looks like it might be a problem. Please try it without the trailing slash:

    imageDirectory="/images"

    Also, EnableZoneSupport should be at the top of your script. I don't believe that should cause an error. I'm not somewhere where I can test this currently, but those are the only two things that seemed like they could be causing the problem.

    When your red light is flashing, you can press the gpio12 button, and it will exit the script and drop to the brightscript debugger. It should tell you the last line that was executed, as well as what it thought the problem was. This information is sent out over the serial port.
Please sign in to leave a comment.