Copy link to clipboard
Copied
I need to find a way to run an event starting with "line 50" ending with "line 150" of an external script: If this is possible, my purpose is to avoid creating multiple .jsx files for each event. I'll create a "base script" for various events. Could such a feat be possible? Thank you
var estr = '//@include "~/Desktop/testes/base_script.jsx";\r\n';
eval(estr);
Copy link to clipboard
Copied
use something like this:
#include "scripts/something.jsx"
foo();
If foo() is function in something.jsx at the line 50 it will works 😉
foo() should be defined only onetimes.
Copy link to clipboard
Copied
Jarda Bereza I confess I did not understand: Can you show me an example with some script? Thank you
Copy link to clipboard
Copied
Example
Main.jsx
#include "scripts/something.jsx"
foo(); //call function "foo" which on line 5
Something.jsx
function bar(){
alert("Hello");
}
function foo(){
alert("world");
}
All code in something.jsx should be wraped inside functions. Otherwise it would execute this code.