How are you invoking the jsl script?
This is what I do if I need to execute a jsl script from a bat or such and pass the jsl a parameter....
- I write my jsl code as a Function with arguments and save it to it's own file - and it never changes.
- I have the bat file create a temporary jsl file that just includes the file from #1 and then has one line that is the call to the function but with the argument on it.
- Then I have the bat file start jmp with the file from #2
From dos prompt ..... cmd /c start jmp "C:\my_constructed.jsl"
where....
my_constructed.jsl contains (and keep in mind this is the tmp file that gets generated then run)
\\!
include ("C:\the_jsl_code_guts.jsl");
x = my_real_code(10);
then....
C:\the_jsl_code_guts.jsl.... contains....
my_real_code = Function(
// function arg
{duration_function_argument},
// local vars
{},
// your code that really does stuff.....
);