Hey,
i wish to pass argument str1, a string argument to a separate script named: "script2run.jsl" for example, nad that script uses str1 argument and print a message such as :
print("This is the important string I successfully passed: " || Eval(str1)) ;
a different script that create a window that will be saved as journal for later usage will triger that script through buttons that would be something like this:
vars4script = {"nine", "one", "two","eight", "eleven"};
win_click = New Window("journal window", Spacer Box( size( 100, 10 )),
Header = TextBox(" journal window buttons",<Panel Box (" buttons1 ", buttons_area1 = H List Box()),
Panel Box (" buttons2 ", buttons_area2 = H List Box()),
Panel Box (" buttons2 ", buttons_area3 = H List Box()),
);
//Method 1
for (i=NItems(vars4script),i,i--,
str1 = vars4script[i] ;
buttons_area1 << Append(Button Box(Eval(str1), include("script2run.jsl", Eval(str1)))));
//Method 2
for(i=NItems(vars4script),i,i--,
str1 = vars4script[i] ;
buttons_area2 << Append(Button Box(Eval(str1), <
//Method 3
for (i = NItems(vars4script), i, i--,
str1 = vars4script[i];
buttons_area3 << Append(Button Box(str1, Eval Expr("include('script2run.jsl', '$str1')"))));
there are 3 methods here but none is working properly when buttons are clicked
Automation and Scripting