Hi @J_Bonnouvrier1 ,
In that case, all you need to do is make sure that your directory path is correctly defined (with the last backslash included), and that you need to concatenate the ".jsl" ending to make sure things work as expected.
As an example, I created three Product JSL files, each with the following commands, but just changing the numbers from 1, to 2, and then 3:
Names Default to Here (1);
Print("This is Product 1 JSL script");
The main JSL file is as follows:
Names Default to Here (1);
Product_List={"Product1", "Product2", "Product3"};
ScriptDir = "C:\temp\"; //Or whatever your path is.
Print("This is the main script");
For(i=1, i<=NItems(Product_List), i++,
Include(ScriptDir||Product_List[i]||".jsl");
);
The output of running the above main code is:
"This is the main script"
"This is Product 1 JSL script"
"This is Product 2 JSL script"
"This is Product 3 JSL script"
It will also work out if you have the ".jsl" as part of the product list, like: Product_List={"Product1.jsl", "Product2.jsl",...}; and then you would remove the ||".jsl" concatenation from the For loop. Either way, you get the same output as above. It just depends on how you want to define the Product_List list.
Hope this helps!,
DS