Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rsromeo
Channel Surfer

CALLING AN EXTERNAL BRS SCRIPT

Is it possible to run an external script from another script? I saw in BRS reference manual, there is something like RUN("pkg:/script.brs") but this only calls another script from within the package. Is it possible to use this to call a script located on the web via URL? Also, does RUN have to be used inside the Main() sub or can it be used anywhere? Thanks for your help.
0 Kudos
3 REPLIES 3
renojim
Community Streaming Expert

Re: CALLING AN EXTERNAL BRS SCRIPT

I have run an external script from "tmp:/", so I know that works. I haven't tried to run an external script from anywhere other than "tmp:/", but you could always try. If it doesn't work, it's a simple matter to transfer the script from a website to "tmp:/" (see roUrlTransfer GetToFile) and run it from there.

It does not have to be run from Main. You can run it from anywhere.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
rsromeo
Channel Surfer

Re: CALLING AN EXTERNAL BRS SCRIPT

Thanks for your reponse. I will give it a try.
0 Kudos
lucasgonze
Visitor

Re: CALLING AN EXTERNAL BRS SCRIPT

You could fetch a remote script into a variable, and then eval() the variable.
0 Kudos