Original question:
Typing the following commands in the script window:
for (ii = 1; ii <= 4;ii ++)
{
type "ii = $(ii)";
};
and highlighting all lines and clicking enter produces the output:
ii = 1
ii = 2
ii = 3
ii = 4
But placing the same commands in a file called test.ogs and issuing the command:
run test.ogs
produces the following (different) output:
ii=5
Answer:--------------------
Hi,
Use the command:
run.section(test.ogs)
instead.
If you then place the code under a section in the OGS file, such as:
[mysection]
for (ii = 1; ii <= 4;ii ++)
{
type "ii = $(ii)";
};
[someothersection]
then you can use the command
run.section(test.ogs,mysection)
Easwar
OriginLab
P.S. I altered the text of your original post by mistake. My apologies.