Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Level 7

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
Highlighted
Level 13

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
0 Kudos
Highlighted
Level 7

Re: CALLING AN EXTERNAL BRS SCRIPT

Thanks for your reponse. I will give it a try.
0 Kudos
Highlighted
Level 7

Re: CALLING AN EXTERNAL BRS SCRIPT

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